Worktrees isolate code. wtm isolates the runtime.
for teams and their agents
Every branch gets its own worktree, ports, Docker Compose project, database and URL, so ten Claude Code agents can run their apps on one laptop.
brew install LucasPcq/tap/wtmgo install github.com/LucasPcq/wtm@latestAgents: read llms.txt, then wtm agents install.
fig. 1 — what wtm writes in each worktree
git worktree gives each branch a directory. wtm gives it the rest.
The same repository, three worktrees. wtm rewrites the ports and addresses in each one's .env files when it creates it, and hands every job the worktree's identity when it runs it. Pick a worktree, or create one.
wtm --help
Create, run, watch, sync, follow.
Five commands cover the day. Every terminal on this page replays what wtm printed in a sandbox repository called acme, trimmed to fit.
Worktrees, ready to work in
Several branches in one command. Each worktree gets its .env files copied and your on_create hooks run (pnpm install…). wtm clean refuses anything uncommitted or unpushed.
A whole stack per worktree
Declare your jobs once in run.toml; wtm run init writes it from your Compose files and package scripts. Each worktree runs it on its own ports, Compose project and database, behind its own *.localhost URL (on port 80 once wtm run proxy install redirects it).
One screen for all of it
Every worktree, the branch tree and the running services, updated live as worktrees come and go from any shell or agent. Pull request status shows up when gh is connected.
Stacked branches, rebased in order
Branch off a branch. When main moves, wtm sync rebases the whole chain, parents before children, and aborts cleanly on a conflict.
Every change, as it happens
Whoever makes it, a shell, an agent or wtm ui: worktrees created and removed, hooks that failed, jobs that started or crashed with their last lines. --output json turns it into JSON Lines for an orchestrator to read, no polling.
wtm agents install
Built for Claude Code to drive.
wtm ships a skill that teaches Claude Code its commands and their unattended forms. Four issues, four agents, four running stacks, one laptop.
Recipe: agents in parallel- --yes
- Every command runs unattended. A missing choice is an error naming its flag, never a prompt the agent cannot answer.
- --output json
- A document to read instead of text to parse, with published JSON schemas.
- exit codes
- Stable and documented: 10 the worktree exists, 11 no such branch, 16 no run.toml…
- wtm events
- Every worktree and job change as JSON Lines, for the agent or whatever orchestrates it.
git worktree add
Same git underneath. Everything around it handled.
| Task | git worktree | wtm |
|---|---|---|
| New worktree | an empty checkout | .env copied, hooks run, ports shifted |
| Two branches running | same ports, containers and database | own ports, Compose project, database and URL |
| Stacked branches | rebase each one by hand, in order | wtm sync rebases the chain |
| Many worktrees | one command each | wtm create a b c, wtm exec --all |
| Agents and tools | parse porcelain output | --output json, --yes, a skill, an event stream |
git tag --list 'v*'
42 releases since April 2026.
Shipped in the open, every week, each with its changelog and a migration note when something moves.
- v0.29.2For scripts and agents:
wtm eventsfollows every repository and reports job crashes,wtm envstops printing secrets,wtm prunestays fast on repositories with many branches, and usage errors exit2. - v0.29.1A fix release for
wtm createandrun.toml, with a shorter isolation question. - v0.29.0wtm opens up to other tools with a live event stream, and works on several worktrees at once.
MIT licensedmacOS, Linux, Windows through WSL2Homebrew, Go, binariesFull changelog
wtm tree
From isolated stacks to orchestrated agents.
What ships next, drawn the way wtm draws branches.
main ✓ shipped worktrees, isolated stacks, stacked branches, wtm ui, wtm events ├─ next/orchestration ● in progress │ └─ one agent per issue: spawned, tracked and cleaned up by wtm └─ explore/claude-api ├─ write run.toml from an analysis of the repository ├─ resolve rebase conflicts while wtm sync walks a stack └─ describe a stack of pull requests
git log --reverse | head -1
Built inside a monorepo that runs a dozen services.
I work at a startup on a monorepo of two apps, each with a frontend, a backend and a back office, over Docker with several databases. Once AI agents could take several tasks at once, every task needed its own running stack, for me to check the work and for the agent to check it itself.
It started as shell scripts to create a worktree, copy its .env and run the hooks. The tools I tried stopped at the worktree. So I built wtm, and today the whole team runs part or all of the monorepo in several worktrees at once with it.