____ __ ___ __ / __ \____ ______/ /_ / | _______/ /____ __ / / / / __ `/ ___/ __/ / /| | / ___/ __ / _ \/ / / /_/ / /_/ / / / /_ / ___ |/ / / /_/ / __/ / /_____/\__,_/_/ \__/ /_/ |_/_/ \__,_/\___/_/
Each branch runs its own isolated stack with ports, containers, and database namespaces allocated automatically from a managed pool. No collisions, no manual port juggling, no stepping on your teammates' running services.
Docktree enables workflows that were previously painful or impossible when running a single Docker Compose instance — all with zero modifications to your existing compose files.
Run multiple coding agents in separate worktrees without port, container, volume, or database collisions. Each agent gets its own isolated Compose stack.
Check out several pull requests as worktrees and run them side by side. Compare UI, API behavior, and database changes without constantly tearing stacks down.
Run end-to-end test suites against multiple feature branches concurrently. Because each branch gets its own database schema and isolated port bindings, tests will never collide or taint shared state.
Expose any local worktree stack externally using docktree tunnel. Share your running feature branch live with product managers, developers, or clients for reviews, without configuring port forwarding.
Compare frontend changes, debug API integration issues, or work on hotfixes in a separate git worktree without having to tear down, rebuild, and restart your main development container stack.
Share heavy infra like databases or message brokers once at the platform tier, while automatically provisioning clean, isolated tenant namespaces or database schemas for every git worktree.
Both apps below are running simultaneously in separate worktrees. Each has its own URL, its own containers, and its own database namespace.
worktree: feature/shopping-cart
worktree: feature/user-auth
Commands cycle automatically. Click a tab to jump to a specific command.
Each worktree gets unique ports from a managed pool (41000–49999). The registry prevents collisions across all worktrees in the repo.
Docktree generates a Compose override with unique project names, container names, and volumes. Shared databases get per-worktree tenant namespaces.
When worktrees are removed or go idle, docktree clean reclaims ports, removes orphaned containers, networks, and volumes.
Docktree ships skills for Claude Code, Codex, Cursor, OpenCode, OMP/Pi, and 60+ other agents.
Teaches your agent which commands honor --json, the error envelope format, lifecycle gotchas, and common multi-worktree workflows.
Walks your agent through docktree init to generate a docktree.yml — scanning compose files and deciding on shared services and tenancy modes.
$ npx skills add Bnjoroge1/Docktree# install globally for a specific agent$ npx skills add Bnjoroge1/Docktree -g -a claude-code