wt
Git worktree manager powered by fzf
A tiny CLI for managing git worktrees with a fuzzy picker. List, switch, create, and remove worktrees without memorizing `git worktree` flags. Ships with a shell function so the picker actually `cd`s you into the selected worktree.
- STATUS
- ACTIVE
- STACK
- ShellfzfGit
- REPOSITORY
- github.com/RodrigoEspinosa/wt
Fuzzy Picker
Run `wt` with no args to open an fzf picker over every worktree in the current repo. Type to filter, Enter to switch.
Commit Preview
The picker shows a preview pane with the last 10 commits of the highlighted worktree so you can remember what each branch actually does.
Auto-Create on Switch
`wt my-feature` switches to that worktree if it exists, or creates it next to the repo root if it doesn’t. One command, either path.
Shell Integration
A small shell function (via `wt init zsh|bash|fish`) wraps the binary so selecting a worktree actually changes your shell’s directory — something a subprocess can’t do on its own.
- STEP 01
Install
Via Homebrew tap, or from source.
bashbrew install RodrigoEspinosa/tap/wt # or from source git clone https://github.com/RodrigoEspinosa/wt.git cd wt make install - STEP 02
Wire up your shell
Needed so `wt` can `cd` into the selected worktree. Add to your shell rc file.
bash# zsh / bash eval "$(wt init zsh)" # or bash # fish wt init fish | source - STEP 03
Use it
Fuzzy picker, or pass a branch name directly.
bash# open the fuzzy picker wt # switch to (or create) a worktree for a branch wt my-feature # remove a worktree wt -d my-feature # list all worktrees wt -l
Environment
# Where new worktrees are created.
# Defaults to a sibling directory of the repo root.
export WT_BASE_DIR="$HOME/code/worktrees"Open the interactive fuzzy picker
wtSwitch to a branch’s worktree (creates it if missing)
wt <branch>Remove a worktree
wt -d <branch>List all worktrees
wt -lPrint shell integration function for your shell
wt init <zsh|bash|fish>
READY TO TRY WT?
VIEW ON GITHUB