Zero-config Docker Compose isolation for each git worktree, giving separate ports, databases, caches and containers.
- for
- Developers using git worktrees and AI coding agents who need isolated Docker environments.
- pricing
- free
- license
- MIT
Key features
- Zero Config — Run `wtc start` and each worktree automatically receives its own isolated Docker Compose stack.
- Port Isolation — Unique ports are assigned per worktree using a deterministic formula, eliminating collisions.
- Container Isolation — Separate COMPOSE_PROJECT_NAME, networks and volumes ensure containers don’t interfere.
- File Sync — Compose files, Dockerfiles and .env are synced from the main branch before each start.
- Env Injection — Port overrides are injected into .env without overwriting existing variables.
- MCP Server — Built-in MCP server lets Claude Code, Codex and other AI agents manage stacks programmatically.
Use cases
- Run parallel feature experiments in separate worktrees without port or DB conflicts
- Allow multiple AI agents to test code changes simultaneously on isolated stacks
- Promote changes from a worktree to the main branch after successful testing
worktree-compose vs alternatives
worktree-compose | Pocketenv | Fine | PostalDataPI | ||
|---|---|---|---|---|---|
| Best for | Isolated Docker stacks per worktree | General sandbox runtime | Comprehensive MCP integration | AI-agent-centric development | Geolocation data API |
| Pricing | Free | Free | Subscription | Free | Subscription |
| DevHunt upvotes | 19 | 73 | 29 | 75 | 76 |
| Launched | Mar 2026 | Apr 2026 | Jan 2026 | Jan 2023 | Apr 2026 |
- worktree-compose vs Pocketenv: Provides a universal sandbox runtime for agents and humans, not specific to git worktrees.
- worktree-compose vs Unified MCP Server: A full MCP server with thousands of tool integrations, whereas worktree-compose offers a lightweight MCP for Docker stacks only.
- worktree-compose vs Fine: Focuses on building software with AI agents, while worktree-compose isolates Docker environments for those agents.
- worktree-compose vs PostalDataPI: Offers API data services, unrelated to Docker isolation for git worktrees.
worktree-compose FAQ
How does worktree-compose avoid port conflicts?+
It calculates a unique port for each service using the formula 20000 + default_port + worktree_index, guaranteeing no collisions.
Do I need to modify my Docker Compose files?+
No, the tool syncs your existing compose files and injects isolated ports automatically.
Can AI agents control the stacks?+
Yes, the built-in MCP server exposes commands that Claude Code, Codex and other agents can invoke.
What commands are available?+
`wtc start`, `wtc stop`, `wtc restart`, `wtc list`, `wtc promote`, and `wtc clean` cover the full workflow.
Is any configuration required?+
It works out of the box; optional `.wtcrc.json` or `wtc` key in package.json can customize sync and env overrides.
Summarized by DevHunt from worktree-compose.com · Sep 27, 2026. Details may change; check the official site.

worktree-compose
Pocketenv
Fine
PostalDataPI









