Fast worktree switching for safer parallel work.
ww is a shell-first Git worktree workflow for the current repository. It keeps the fast switch/create/remove loop, then adds an interactive cleanup path so parallel work stays manageable.
The demo is now a workflow overview in about a minute, with a short ww-helper --json tail:
- switch into an existing worktree with the
fzffast path - inspect the current workspace set with
ww list - create a fresh branch workspace with
ww new feat-demo - remove the temporary workspace with safe
ww rm - review stale workspaces with
ww rm --cleanup - end with a quick machine-readable
ww-helper --jsonpass
wwchanges the current shell directory, so switching worktrees feels like changing folders, not launching a side tool.ww new <name>creates a fresh branch workspace and moves your shell into it immediately.ww listshows all worktrees at a glance with ahead/behind counts and file changes;ww list --verboseadds labels, intent, and metadata.ww rmexplains what will be removed, what will be kept, and what looks risky before you confirm.ww rm --cleanuplets you review old worktrees and delete the ones you no longer need.
Install with Homebrew tap:
brew tap unix2dos/ww https://github.com/unix2dos/ww
brew install ww
printf 'eval "$("%s/bin/ww-helper" init zsh)"\n' "$(brew --prefix ww)" >> ~/.zshrc
source ~/.zshrcww-helper init zsh prints the activation snippet if you want to inspect it before adding it to your shell rc file.
Or install the latest release for your shell:
curl -fsSL https://github.com/unix2dos/ww/releases/latest/download/install-release.sh | bash
source ~/.zshrcThen try the boundary-safe loop inside any Git repository:
ww
ww new feat-demo
ww list
ww rm feat-demo
ww rm --cleanupFor the fastest path, install fzf. If fzf is not available, ww automatically falls back to the built-in selector, so the workflow still works without extra setup.
Use ww-helper for programmatic calls. ww stays shell-first for humans and still changes your current shell directory for switch and new.
Current machine-readable commands:
ww-helper list --json
ww-helper new-path --json --label agent:codex --ttl 24h -m "Fix login redirect" feat-demo
ww-helper gc --ttl-expired --dry-run --json
ww-helper rm --json --non-interactive feat-demoThe shared contract for coding agents is the machine-readable ww-helper interface plus repository instructions in AGENTS.md.
Human-facing safety flow:
ww new feat-a
ww rm --cleanupww-helper rm --json uses the same JSON envelope shape as the other machine-readable commands. For humans, bulk cleanup lives under ww rm --cleanup. For automation, ww-helper gc still requires at least one explicit selector such as --ttl-expired, --idle 7d, or --merged.
README.md stays in landing-page mode. Detailed install, usage, release, and command reference live in: