Open-source dev tool
Give every agent
its own berth.
Running 5, 10, 50 AI coding agents in parallel on git worktrees? They collide — same ports, same database, same cache. Berth gives each agent its own isolated dev environment. One command up, one command down.
$ berth up agent-1 Worktree: ../myapp-agent-1 Ports: BACKEND_PORT 60291 FRONTEND_PORT 60292 URLs: http://localhost:60291 http://localhost:60292 ✓ Berth 'agent-1' is running. $ berth ls NAME BRANCH STATUS AGE PORTS agent-1 agent-1 running 2m 60291,60292 agent-2 agent-2 running 40s 60486,60487
The problem
50 agents. One set of ports.
The new normal is a swarm of coding agents — Claude Code, Codex, Cursor, Aider — each on its own worktree, each trying to boot the same dev stack. They fight over ports, share one database, and step on each other's state. So you babysit `.env` files and tmux tabs instead of shipping. Berth makes each environment disposable and isolated, so the agents never collide.
How it works
Up. Isolated. Down.
A single binary on top of the tools you already use — git worktree and Docker Compose.
Isolated worktree & env
berth up <name> creates a fresh branch-per-agent worktree and boots its dev services in their own Compose project — network, volumes, and DB namespaced per berth.
Auto, non-colliding ports
Berth finds free ports, injects them as env vars, and prints the URLs. No more address already in use when the tenth agent wakes up.
One command down
berth down <name> tears down services and volumes and removes the worktree. Abandoned an agent? --force discards it cleanly. berth ls shows what's running where.
Why devs pick it
Thin, tool-agnostic, out of your way
Not an agent runner
It's the environment layer underneath whatever agents you already run. Keep your workflow — Berth just isolates it.
Zero shared state
Each berth gets its own DB, cache, and volumes. Agents can't corrupt each other's data or trip over half-migrated schemas.
Local-first, single binary
No daemon to babysit, no cloud account, no bill. Build it from source and it just works on your own projects.
Free & open source
MIT licensed. Fork it, read it, send a PR. This is a tool we build for ourselves, in the open.
Get started
Install & run
Requires git and Docker with the Compose plugin.
# build from source $ git clone github.com/zoltanersek/berth $ cd berth && cargo install --path . # in any repo with a berth.yml $ berth up agent-1 $ berth ls $ berth down agent-1
Stop letting your agents collide.
Berth is free and open source. Star it, try it, tell us what breaks.
View Berth on GitHub