Context
I run multiple AI coding agents (Claude Code, Cursor, Windsurf) on the same repo in parallel. The isolation mechanism is git worktree — each agent gets its own working directory while sharing the same .git history. No cloning, no disk waste.
The problem is management. The native git worktree commands are bare-bones — manual paths, no naming, no config copying. And tools like Claude Code Desktop and Codex create worktrees on their own, but each does it differently. There's no unified way to list, switch between, or clean them up.
git-wt
I built git-wt — a pure Bash wrapper that gives you one CLI for all of this:
# Create 3 isolated worktrees from main
git wt add main --copy-env # → "swift-jade"
git wt add main --copy-env # → "bold-ember"
git wt add main --copy-env # → "calm-frost"
# Open each in a separate editor window
git wt open swift-jade --editor cursor
git wt open bold-ember --editor cursor
git wt open calm-frost --editor cursor
# Launch an AI agent in each — zero conflicts
What it does
Auto-naming. Each worktree gets a memorable name like swift-jade — no thinking about paths.
Centralized storage. Everything lives in ~/.git-wt/, not inside your project directory.
--copy-env. Copies .env and config files into the new worktree automatically. Without this, every worktree needs manual setup before it can run anything.
Shell completions. Full Bash/Zsh tab completion — commands, flags, worktree names.
Editor integration. git wt open <name> --editor code opens the worktree directly in VS Code or Cursor.
AI agent support. Ships with a SKILL.md file — Claude Code discovers and uses git-wt on its own without you explaining the commands.
Installation
Zero dependencies, 5 seconds:
curl -fsSL https://raw.githubusercontent.com/kuderr/git-wt/main/install.sh | bash
Works as a git subcommand: git wt <command>.
Other use cases
Not just for AI agents:
- Code reviews — check out a PR in a separate worktree without touching your current work
-
Hotfixes — create a worktree for a fix without
git stash - Testing — run tests in one worktree while developing in another
GitHub: https://github.com/kuderr/git-wt
Stars and feedback welcome.
Top comments (0)