Skip to main content

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.

Metadata

Release files for woosh 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for woosh 0.1.0
File Size Uploaded Provenance
woosh-0.1.0.tar.gz 13.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for woosh 0.1.0
File Interpreter ABI Platform
woosh-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 33.1 kB

Release files / woosh-0.1.0.tar.gz

Download URL woosh-0.1.0.tar.gz
Size 13.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d5dd619dd58ff95d1968d3b8e3307f7cf7e60151008f18989f018a182c79d8cd
BLAKE2b-256 checksum
How to use checksums
d1587c0b5a63a4db5833babf39438216982246d994748a0d498ba4fa0fadd4ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.14

Release files / woosh-0.1.0-py3-none-any.whl

Download URL woosh-0.1.0-py3-none-any.whl
Size 19.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
203ff7709196510d68db0def3558908a23ec72952d6bb955e81f0c7e297d6257
BLAKE2b-256 checksum
How to use checksums
76a9af1097c09c1fd01eb65e556e26d61edd7926f1c186657adfae43f91f2a98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.14

Security for woosh 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page