A Rust CLI tool that makes working with git worktrees easier and more intuitive.
- 🔍 List all worktrees with colorful, easy-to-read output
- ➕ Create new worktrees with interactive prompts
- 🔄 Switch between worktrees with a simple selection menu
- 🗑️ Remove worktrees safely with confirmation
- ℹ️ Info about current worktree status
Install the latest release with one command:
curl -sSL https://github.com/hoangbits/wt/raw/main/install.sh | shThis script:
- Detects your platform (Linux, macOS, Windows)
- Downloads the correct prebuilt binary
- Installs to
~/.local/bin/wt - Shows instructions for adding to PATH if needed
Download prebuilt binaries from GitHub Releases:
- Linux (x86_64):
wt-x86_64-unknown-linux-gnu.tar.gz - macOS Intel:
wt-x86_64-apple-darwin.tar.gz - macOS Apple Silicon:
wt-aarch64-apple-darwin.tar.gz - Windows:
wt-x86_64-pc-windows-msvc.zip
Extract and place the wt binary somewhere in your PATH.
For Rust developers:
# From crates.io (when published)
cargo install wt
# From GitHub
cargo install --git https://github.com/hoangbits/wt.git
# Local build
git clone https://github.com/hoangbits/wt.git
cd wt
cargo build --release
cp target/release/wt /usr/local/bin/wt list# Interactive mode
wt new
# With specific branch and directory
wt new -b feature/new-feature -d ../project-feature
# Create new branch
wt new -b new-feature-branchwt switchwt removewt info# git worktree: remember syntax, paths, and options
git worktree add -b feature-login ../project-login
cd ../project-login
# wt: interactive prompts guide you
wt newThe default git worktree list output is hard to parse. wt list shows:
- Which worktree you're currently in
- Color-coded branches and paths
- Shortened commit hashes
- Clean, numbered format
- Prevents removing the current worktree
- Confirms before deletion
- Validates branch names
- Shows exactly what will happen
wt switchvscd /long/path/to/worktreewt newvs remembering all the git worktree flagswt removevsgit worktree remove /path
# See what you have
wt list
# Start new feature
wt new
# Prompts guide you through branch/directory setup
# Switch between features
wt switch
# Pick from a menu instead of remembering paths
# Clean up when done
wt remove
# Select from list, confirm deletionclap- Command line argument parsingdialoguer- Interactive prompts and menuscolored- Colorful terminal outputanyhow- Error handlingserde&serde_json- Data serialization
cargo build --releasecargo test