Skip to content

One branch, one worktree, one isolated dev stack.

A worktree manager for teams that work on several branches at once, and let their agents do too.

git worktree gives each branch a directory. Everything else is still on you: copy the .env, install dependencies, remember which directory holds which branch, and run two branches' dev servers without them fighting over the same ports, containers and databases.

Provisioned

wtm create copies the .env files, runs your on_create hooks (pnpm install, …) and shifts the ports. wtm go jumps into it.

Cleaned when merged

wtm prune removes every worktree whose PR is merged, in one pass, and refuses one that still holds uncommitted or unpushed work.

Stacked branches

Every worktree records its parent. wtm tree draws the forest, wtm sync rebases a branch and its descendants in order.

Many at once

wtm create a b c, wtm exec --all -- pnpm test: one command across worktrees, in parallel, each with its own environment.

Configure it once, share it with wtm run export, and every developer and every agent gets the full stack in its own worktree: its own ports, its own COMPOSE_PROJECT_NAME, its own database in a shared postgres, its own URL. Two branches run side by side; an agent can start the app it is working on and test it end to end without touching yours.

wtm run up on two worktrees at once: each runs its own api and web on its own named URLs

wtm is meant to be driven by something other than a person. wtm agents install adds a skill that teaches Claude Code or Cursor the commands and their unattended forms. Data commands take --output json, every change takes --yes, exit codes are stable, and wtm events streams every change as JSON Lines.

Terminal window
wtm create feat/a feat/b --yes --output json
wtm run up feat/a --yes -d
wtm events --output json | jq -c 'select(.type == "worktree.provisioned")'

This site is also served as plain text for agents: llms.txt, llms-full.txt.

wtm ui shows every worktree, the branch tree, PR status and the running services, and updates live as worktrees come and go from any shell or agent.

The wtm ui dashboard: worktrees, a new one created from the dashboard, the branch tree
Terminal window
brew install LucasPcq/tap/wtm

Then let wtm go change your directory, and set up a repository:

Terminal window
echo 'eval "$(wtm shell-init)"' >> ~/.zshrc # ~/.bashrc for bash
cd your-repo && wtm init

macOS and Linux, amd64 and arm64; Windows through WSL2. A specific version, updating and the other details are in Installation.