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:
- Scan (deterministic, no LLM involved) — project files
(
docker-compose.yml,Dockerfile,.env*), host's listening TCP ports, running containers, existing docker networks. - Plan — the agent (OpenAI tool-calling loop) reasons over the scan and
calls
propose_plan. It can callask_usermid-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. - Confirm — the plan is printed (strategy, steps, flagged
[risky]steps, port conflicts, a diff of anydocker-compose.ymlchanges). You approve or abort. Nothing is touched until you say yes. - Execute — only now does the agent get
write_file/run_shell/health_check.run_shellis whitelisted at the argv level todocker/docker-composeonly. Any destructive action not already in the approved plan (stopping an unrelated container, pruning, deleting a volume) still requires a freshask_userconfirmation.
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, swapconfig.pyto use thekeyringpackage (OS keychain) instead — the rest of the code doesn't care where the key comes from. scan_listening_ports()usespsutil; 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5dd619dd58ff95d1968d3b8e3307f7cf7e60151008f18989f018a182c79d8cd
|
|
| MD5 |
d3cd1823e5fa224f6dfacbc084555cb4
|
|
| BLAKE2b-256 |
d1587c0b5a63a4db5833babf39438216982246d994748a0d498ba4fa0fadd4ab
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
203ff7709196510d68db0def3558908a23ec72952d6bb955e81f0c7e297d6257
|
|
| MD5 |
b9a10b000faf9787ada2063e968e73f0
|
|
| BLAKE2b-256 |
76a9af1097c09c1fd01eb65e556e26d61edd7926f1c186657adfae43f91f2a98
|