Install
openclaw skills install worktree-managerManage Docker-based dev instances and git worktrees. Handles app container lifecycle, database seeding, and proxy route activation. Requires mysql-manager and proxy-manager to be running first.
openclaw skills install worktree-managerManages Docker app instances and git worktrees for local development.
Each instance gets its own docker-compose stack (backend + frontend), isolated git branch, and .env.worktree-<name> file. MySQL and nginx-proxy are managed separately by their own plugins.
Start these first (order matters):
proxy-manager start — creates the shared Docker network (nginx-proxy_net)mysql-manager start — starts the shared MySQL containerproject/
├── docker-compose.yml # app stack template (backend + frontend)
├── run.sh # this plugin's entry point (copy to project root)
├── .env.base # main instance env
├── .env.worktree-<name> # per-worktree env (gitignored)
└── .worktrees/
└── <name>/ # git worktree (gitignored)
main → .env.base, project rootworktree → .env.worktree-<name>, checked out at .worktrees/<name>http://<name>.frontend.localhost / http://<name>.backend.localhostAll commands run from the project root:
./run.sh list # show all instances + mysql/proxy status
./run.sh start [main|<name>] # seed db, start containers, connect proxy
./run.sh stop [main|<name>] # stop containers (db persists)
./run.sh restart [main|<name>] # stop then start
./run.sh logs [main|<name>] # follow container logs
./run.sh create-worktree <name> # git worktree + branch + env file
./run.sh remove-worktree <name> # stop containers + drop db + remove worktree
proxy-manager/run.sh start # network + nginx-proxy
mysql-manager/run.sh start # MySQL
./run.sh start main # main app instance
./run.sh create-worktree <name> — creates branch worktree/<name>, dir .worktrees/<name>, env file./run.sh start <name> — seeds db from main snapshot, starts containers, activates proxy route./run.sh stop <name>
Confirm with user: "Remove worktree '<name>'? Deletes containers, database, git worktree (branch worktree/<name>), and .env.worktree-<name>."
./run.sh remove-worktree <name>
./run.sh list
start DoesCREATE DATABASE IF NOT EXISTS for the instancecodai_main → instance dbdocker compose up --build -ddocker network connect — proxy to instance network (activates routes)./run.sh list before starting — it shows MySQL/proxy status.remove-worktree — it is irreversible.start, print the frontend and backend URLs../run.sh is not executable: chmod +x run.sh.env.worktree-* files and .worktrees/ dir must be gitignored.| Variable | Default | Purpose |
|---|---|---|
MYSQL_CONTAINER | codai_db | MySQL container name |
MYSQL_ROOT_PASS | secret | MySQL root password |
MYSQL_MAIN_DB | codai_main | Source DB for snapshots |
PROXY_CONTAINER | codai_nginx_proxy | nginx-proxy container name |
PROJECT_PREFIX | codai-dev | Docker Compose project prefix |
proxy-manager — nginx-proxy lifecycle and network management (start first)mysql-manager — MySQL lifecycle and database admin (start second)