@@ -25,14 +25,40 @@ Inspired by [haacked/dotfiles/tree-me](https://github.com/haacked/dotfiles/blob/
2525### Homebrew (macOS and Linux)
2626
2727``` bash
28- brew tap timvw/tap
29- brew install wt
28+ brew install timvw/tap/wt
29+ wt init # Configure shell integration
3030```
3131
32+ ### Scoop (Windows)
33+
34+ ``` powershell
35+ scoop bucket add timvw https://github.com/timvw/scoop-bucket
36+ scoop install wt
37+ wt init # Configure shell integration
38+ ```
39+
40+ ### Linux Packages
41+
42+ Download ` .deb ` , ` .rpm ` , or ` .pkg.tar.zst ` packages from the [ releases page] ( https://github.com/timvw/wt/releases ) .
43+
44+ ``` bash
45+ # Debian/Ubuntu
46+ sudo dpkg -i wt_* .deb
47+
48+ # Fedora/RHEL
49+ sudo rpm -i wt_* .rpm
50+
51+ # Arch Linux (AUR)
52+ yay -S wt-bin
53+ ```
54+
55+ Shell integration is automatically configured during package installation.
56+
3257### From Source
3358
3459``` bash
3560go install github.com/timvw/wt@latest
61+ wt init # Configure shell integration
3662```
3763
3864Or clone and build:
@@ -50,22 +76,41 @@ just install-user # installs to ~/bin (no sudo)
5076mkdir -p bin
5177go build -o bin/wt .
5278sudo cp bin/wt /usr/local/bin/
79+
80+ # Configure shell integration
81+ wt init
5382```
5483
55- ### Shell Integration (Optional but Recommended)
84+ ### Shell Integration
5685
57- Add this to the ** END ** of your ` ~/.bashrc ` or ` ~/.zshrc ` :
86+ The ` wt init ` command automatically configures shell integration for your shell :
5887
5988``` bash
60- source <( wt shellenv)
89+ wt init # Auto-detect shell and configure
90+ wt init bash # Configure for bash specifically
91+ wt init zsh # Configure for zsh specifically
92+ wt init --dry-run # Preview changes without modifying files
93+ wt init --uninstall # Remove wt configuration from shell
6194```
6295
63- ** Note for zsh users:** Place this after ` compinit ` in your config file.
96+ After running ` wt init ` , restart your shell or run:
97+ ``` bash
98+ source ~ /.bashrc # for bash
99+ source ~ /.zshrc # for zsh
100+ ```
64101
65- This enables:
102+ Shell integration enables:
66103- Automatic ` cd ` to worktree after ` checkout ` /` create ` /` pr ` /` mr ` commands
67104- Tab completion for commands and branch names
68105
106+ ** Manual setup** (alternative to ` wt init ` ): Add this to the ** END** of your shell config:
107+
108+ ``` bash
109+ eval " $( wt shellenv) "
110+ ```
111+
112+ ** Note for zsh users:** Place this after ` compinit ` in your config file.
113+
69114## Usage
70115
71116### Commands
@@ -102,7 +147,11 @@ wt rm # interactive: select from existing worktrees
102147# Clean up stale worktree administrative files
103148wt prune
104149
105- # Show shell integration code
150+ # Configure shell integration
151+ wt init
152+ wt init --uninstall # Remove shell integration
153+
154+ # Show shell integration code (for manual setup)
106155wt shellenv
107156
108157# Show version
0 commit comments