Magical git branch contexts. Work on multiple branches simultaneously across terminal windows with zero confusion.
wiz create feat-auth
wiz create bugfix-login
wiz spawn feat-auth # opens new terminal tab
wiz spawn bugfix-login # opens another tab
# Each tab shows: 🧙 feat-auth — myapp
# Run Claude Code in parallel on different branches
go install github.com/buck3000/wiz@latestOr build from source:
git clone https://github.com/buck3000/wiz.git
cd wiz
go build -o wiz .Add to your shell rc file:
zsh (~/.zshrc):
eval "$(wiz init zsh)"bash (~/.bashrc):
eval "$(wiz init bash)"fish (~/.config/fish/config.fish):
wiz init fish | sourceThis gives you:
- A
wizshell function that handleswiz enterproperly - Automatic prompt prefix:
🧙 feat-auth*(with dirty indicator) - Terminal title:
🧙 feat-auth — myapp - iTerm2 badge support (automatic when detected)
wiz create feat-auth
wiz enter feat-auth
# You're now in an isolated working directory on the feat-auth branchwiz create feat-auth
wiz create bugfix-login --base main
wiz spawn feat-auth # New terminal tab → cd into feat-auth context
wiz spawn bugfix-login # Another tab → cd into bugfix-login context
# Run `claude` in each tab independentlywiz status # Show current context status
wiz list # List all contexts
wiz list --json # Machine-readable outputwiz run feat-auth -- git log --oneline -5
wiz run feat-auth -- make testwiz delete feat-auth
wiz delete bugfix-login --force # Skip dirty check| Command | Description |
|---|---|
wiz |
Launch interactive TUI picker |
wiz create <name> [--base <branch>] [--strategy auto|worktree|clone] |
Create a new context |
wiz list [--json] |
List all contexts |
wiz enter <name> |
Activate context in current shell |
wiz spawn <name> |
Open new terminal tab in context |
wiz run <name> -- <cmd...> |
Run command inside context |
wiz path <name> |
Print context filesystem path |
wiz rename <old> <new> |
Rename a context |
wiz delete <name> [--force] |
Delete a context |
wiz status [--porcelain] |
Show current context status |
wiz init <bash|zsh|fish> |
Print shell integration script |
wiz doctor |
Check environment and show active enhancements |
Under the hood, wiz uses git worktrees to create isolated working directories that share the same object store. This means:
- Contexts are instant to create (no cloning)
- All contexts share git objects (disk efficient)
- Each context has its own working tree, index, and HEAD
- Multiple terminals can operate on different branches without conflicts
State is stored in <repo>/.git/wiz/:
state.json— context registrywiz.lock— file lock for concurrent safetytrees/— worktree directories
A clone strategy is available as a fallback (--strategy clone) for edge cases where worktrees aren't suitable. It uses git clone --shared for object sharing.
wiz doctor shows which enhancements are active:
✓ Git: git version 2.43.0
✓ Terminal: iTerm2 (features: title, badge, tab-color)
✓ Shell integration: Active (WIZ_CTX set)
✓ Active context: feat-auth
| Terminal | Title | Badge | Tab Color |
|---|---|---|---|
| iTerm2 | Yes | Yes | Yes |
| Kitty | Yes | — | — |
| WezTerm | Yes | — | — |
| tmux | Yes | — | — |
| VS Code | Yes | — | — |
When inside a context, these are exported:
| Variable | Description |
|---|---|
WIZ_CTX |
Context name |
WIZ_REPO |
Repository name |
WIZ_DIR |
Context directory path |
WIZ_BRANCH |
Git branch name |
WIZ_PROMPT |
Formatted prompt string (set by hook) |
go test ./... -race