← Back to products

worktree-compose automatically gives every git worktree its own isolated Docker Compose stack. It solves environment conflicts when running parallel developers or AI agents by isolating ports, databases, caches, and containers with zero configuration. Launch multiple experiments, compare live URLs, and promote the best result.see more

Developer ToolsGitHub
Feb 23, 2026

Founder

Uunknown

Screenshots

worktree-compose screenshot 1
worktree-compose screenshot 2

About

Imagine a world where managing multiple development environments, especially when dealing with containerized services, is completely seamless and conflict-free. That is the promise of worktree-compose. If you have ever struggled with two different feature branches needing slightly different versions of a local database, or perhaps running parallel experiments where one setup keeps hijacking the port of another, you know the frustration of environment collision. worktree-compose solves this fundamental problem for developers by intelligently isolating your Docker Compose stacks on a per git worktree basis. This isn't just about running containers; it's about running them safely and independently, giving every branch, every experiment, and every developer their own clean slate without you having to lift a finger for configuration. It automatically handles the complexity of port mapping, service discovery, and resource allocation, ensuring that when you switch context between branches, your local services switch with you, perfectly isolated and ready to go.

This level of zero-configuration isolation fundamentally changes how you approach parallel development and testing. Think about running complex integration tests for two separate pull requests simultaneously, or having an AI agent working on one branch while you iterate on another feature branch side by side. With traditional setups, this quickly devolves into a messy scramble of stopping and starting services, manually changing environment variables, and hoping nothing breaks. worktree-compose eliminates that chaos. Because each worktree gets its own dedicated set of containers, databases, and caches, you can launch multiple experiments, compare live URLs directly against each other, and confidently promote the winning solution knowing that the testing environment was pristine and untouched by other ongoing work. It’s about maximizing your throughput and minimizing the cognitive load associated with managing infrastructure dependencies, allowing you to focus purely on writing great code and delivering features faster than ever before.

Ultimately, worktree-compose acts as an invisible layer of infrastructure sanity, deeply integrated with your Git workflow. It respects the context of your worktree, meaning when you check out a branch, the correct, isolated environment spins up, and when you check out another, the previous one gracefully steps aside without interfering. This powerful automation drastically reduces setup time and debugging headaches related to environment drift. For teams collaborating on large projects, or for individual developers juggling numerous tasks that require distinct local backends, this tool transforms a major pain point into a non issue, fostering a much smoother, more productive, and significantly less error prone development lifecycle.