A fast, simple Git worktree helper written in Go. Inspired by haacked/dotfiles/tree-me.
- Configurable worktree strategies:
global,sibling-repo,parent-branches, and more - Simple commands for common worktree operations
- Interactive selection menus for checkout, remove, pr, and mr commands
- GitHub PR support via
wt prcommand (usesghCLI) — checks out the PR's actual branch name - GitLab MR support via
wt mrcommand (usesglabCLI) — checks out the MR's actual branch name - Pre/post command hooks — run custom scripts (e.g. copy
.env, install deps) on create/checkout/remove - Shell integration with auto-cd functionality
- Tab completion for Bash and Zsh
brew install timvw/tap/wt # or: go install github.com/timvw/wt@latest
wt init # configure shell integrationSee docs/installation.md for all platforms (Scoop, WinGet, Linux packages, from source).
# Checkout existing branch in new worktree
wt co feature-branch
wt co # interactive: select from available branches
# Create new branch in worktree (defaults to main/master as base)
wt create my-feature
wt create my-feature develop # specify base branch# Checkout GitHub PR (requires gh CLI)
wt pr 123 # looks up branch for PR #123
wt pr https://github.com/org/repo/pull/123 # GitHub PR URL
wt pr # interactive: select from open PRs
# Checkout GitLab MR (requires glab CLI)
wt mr 123 # looks up branch for MR !123
wt mr https://gitlab.com/org/repo/-/merge_requests/123 # GitLab MR URL
wt mr # interactive: select from open MRswt ls # list all worktrees
wt rm old-branch # remove a worktree
wt rm # interactive: select worktree to removewt migrate # migrate worktrees to configured paths
wt migrate --force # force when target path exists
wt prune # clean up stale worktree admin files
wt version # show version
wt examples # show practical examples
wt --help # show helpwt info # show active strategy, pattern, variables
wt config show # show effective config with sources
wt config init # create a default config file
wt config path # print the config file pathWhen you run wt co, wt rm, wt pr, or wt mr without arguments, you'll get an interactive selection menu.
Most commands support machine-readable JSON output:
wt --format json version
wt --format json info
wt --format json config show
wt --format json list
wt --format json examplesIn json mode, shell integration does not auto-navigate. For commands that normally prompt interactively, pass explicit arguments when using --format json.
| Topic | Description |
|---|---|
| Configuration | Config file, strategies, patterns, separator, hooks |
| Examples | Claude Code + tmux, multi-repo workflows, environment variables |
| Installation | All platforms, shell integration, building from source |
| Development | Building, testing, running from source |
The tool wraps Git's native worktree commands with a convenient interface and organized directory structure:
- Organized Structure: All worktrees for a repo are kept together
- Smart Defaults: Automatically detects repo name and default branch
- Prevents Duplicates: Checks if a worktree already exists before creating
- Auto-CD: With shell integration, automatically changes to the worktree directory
- Tab Completion: Makes it easy to work with existing branches
MIT
Based on tree-me by Phil Haack.



