Skip to main content

Agentic auto-deployer: scan a project + VM, propose a deployment plan, confirm, then ship it behind a reverse proxy — one command.

Project description

woosh

One command — woosh install — that scans a project and the host it's running on, has an LLM agent plan the deployment, shows you the plan, and only then deploys behind a shared reverse proxy (Caddy or Nginx).

Install

pip install -e .

First run triggers onboarding automatically; or run it explicitly:

woosh init

This asks for your OpenAI API key and which model to use, then stores them at ~/.woosh/config.json (owner-only file permissions, chmod 600). You can also skip onboarding by exporting OPENAI_API_KEY yourself.

Use

cd your-project
woosh install

Flow:

  1. Scan (deterministic, no LLM involved) — project files (docker-compose.yml, Dockerfile, .env*), host's listening TCP ports, running containers, existing docker networks.
  2. Plan — the agent (OpenAI tool-calling loop) reasons over the scan and calls propose_plan. It can call ask_user mid-reasoning if it's missing something (domain name, TLS on/off, how to resolve a port clash). It has read-only tools in this phase — it cannot write or run anything yet.
  3. Confirm — the plan is printed (strategy, steps, flagged [risky] steps, port conflicts, a diff of any docker-compose.yml changes). You approve or abort. Nothing is touched until you say yes.
  4. Execute — only now does the agent get write_file / run_shell / health_check. run_shell is whitelisted at the argv level to docker/docker-compose only. Any destructive action not already in the approved plan (stopping an unrelated container, pruning, deleting a volume) still requires a fresh ask_user confirmation.

Why a shared reverse proxy

On a VM running multiple deployments, the agent is instructed to prefer attaching new services to one shared Caddy (or Nginx) instance on an external docker network (woosh_proxy) rather than spinning up a proxy per project — that's what avoids the "everything wants port 80/443" problem permanently. It only proposes installing a fresh shared proxy if neither is already running on the host.

Project layout

woosh/
  cli.py                 # `woosh install` / `woosh init`
  config.py              # onboarding + local key storage
  compose_editor.py       # structured docker-compose.yml read/edit/write
  scanners/
    filesystem.py         # detect deploy strategy from project files
    ports.py               # what's listening on the host
    containers.py           # docker ps / docker network ls
  proxy/
    caddy.py, nginx.py     # render reverse-proxy config from routes
    templates/              # Jinja2 templates for both
  agent/
    prompts.py             # plan-phase / execute-phase system prompts
    tools.py                 # OpenAI tool schemas + implementations
    loop.py                   # the tool-calling loop itself
  utils/
    shell.py               # argv-level command whitelist
    display.py              # plan rendering, confirm gate, ask_user UI

Notes / next steps

  • The OpenAI key is stored in plaintext JSON with chmod 600. For a more hardened setup, swap config.py to use the keyring package (OS keychain) instead — the rest of the code doesn't care where the key comes from.
  • scan_listening_ports() uses psutil; process-name resolution can be incomplete without root on some systems, but port numbers are always accurate.
  • TLS: Caddy defaults to automatic HTTPS for real domains; pass tls: "internal" in a route for self-signed/local certs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

woosh-0.1.0.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

woosh-0.1.0-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file woosh-0.1.0.tar.gz.

File metadata

  • Download URL: woosh-0.1.0.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.14

File hashes

Hashes for woosh-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d5dd619dd58ff95d1968d3b8e3307f7cf7e60151008f18989f018a182c79d8cd
MD5 d3cd1823e5fa224f6dfacbc084555cb4
BLAKE2b-256 d1587c0b5a63a4db5833babf39438216982246d994748a0d498ba4fa0fadd4ab

See more details on using hashes here.

File details

Details for the file woosh-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: woosh-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.14

File hashes

Hashes for woosh-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 203ff7709196510d68db0def3558908a23ec72952d6bb955e81f0c7e297d6257
MD5 b9a10b000faf9787ada2063e968e73f0
BLAKE2b-256 76a9af1097c09c1fd01eb65e556e26d61edd7926f1c186657adfae43f91f2a98

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page