Skip to content

Latest commit

 

History

History
99 lines (70 loc) · 2.07 KB

File metadata and controls

99 lines (70 loc) · 2.07 KB

Installation

Homebrew (macOS and Linux)

brew install timvw/tap/wt
wt init  # Configure shell integration

Scoop (Windows)

scoop bucket add timvw https://github.com/timvw/scoop-bucket
scoop install wt
wt init  # Configure shell integration

WinGet (Windows)

winget install timvw.wt
wt init  # Configure shell integration

Linux Packages

Download .deb, .rpm, or .pkg.tar.zst packages from the releases page.

# Debian/Ubuntu
sudo dpkg -i wt_*.deb

# Fedora/RHEL
sudo rpm -i wt_*.rpm

# Arch Linux (AUR)
yay -S wt-bin

Shell integration is automatically configured during package installation.

From Source

go install github.com/timvw/wt@latest
wt init  # Configure shell integration

Or clone and build:

git clone https://github.com/timvw/wt.git
cd wt

# Using just (recommended)
just build            # builds to bin/wt
just install          # installs to /usr/local/bin (requires sudo)
just install-user     # installs to ~/bin (no sudo)

# Or build directly with go
mkdir -p bin
go build -o bin/wt .
sudo cp bin/wt /usr/local/bin/

# Configure shell integration
wt init

Shell Integration

The wt init command automatically configures shell integration for your shell:

wt init              # Auto-detect shell and configure
wt init bash         # Configure for bash specifically
wt init zsh          # Configure for zsh specifically
wt init --dry-run    # Preview changes without modifying files
wt init --uninstall  # Remove wt configuration from shell

After running wt init, restart your shell or run:

source ~/.bashrc   # for bash
source "${ZDOTDIR:-$HOME}/.zshrc"    # for zsh

Shell integration enables:

  • Automatic cd to worktree after checkout/create/pr/mr commands
  • Tab completion for commands and branch names

Manual setup (alternative to wt init): Add this to the END of your shell config:

eval "$(wt shellenv)"

Note for zsh users: Place this after compinit in your config file.