| Crates.io | gwik |
| lib.rs | gwik |
| version | 0.0.6 |
| created_at | 2026-01-18 15:05:57.733193+00 |
| updated_at | 2026-01-19 14:17:11.536456+00 |
| description | A CLI tool for simplified Git worktree management |
| homepage | https://github.com/furon-kuina/gwik |
| repository | https://github.com/furon-kuina/gwik |
| max_upload_size | |
| id | 2052458 |
| size | 49,759 |
A CLI tool for simplified Git worktree management.
cargo install gwik
cargo binstall gwik
Or download from GitHub Releases.
git clone https://github.com/furon-kuina/gwik.git
cd gwik
cargo install --path .
# Set up shell integration (add to .bashrc or .zshrc)
eval "$(gwik init bash)" # or zsh
# Create a new worktree for a feature branch
gwik open feature/new-api
# -> Creates .worktrees/feature-new-api and cd into it
# List all worktrees
gwik list
# Switch to another worktree
gwik cd bugfix-auth
# Clean up when done
gwik close feature-new-api
gwik open <branch-name>Creates a new worktree with an associated branch.
gwik open feature/login
# Created worktree at .worktrees/feature-login
# (automatically cd into it with shell integration)
/ are converted to - for the directory name--yes to skip confirmation when using an existing branchRemote branches:
gwik open origin/feature-x
# Creates local tracking branch automatically
gwik close [worktree-name]Removes a worktree (branch is kept).
gwik close feature-login
# Removed worktree: feature-login
# (automatically cd to main repo with shell integration)
--yes to skip confirmation when inside the target worktreegwik listLists all worktrees in the current repository.
gwik list
# /path/to/repo/.worktrees/feature-login
# /path/to/repo/.worktrees/bugfix-auth
Output is one path per line, suitable for piping to fzf or peco.
List across all repositories:
gwik list --all
gwik cd <worktree-name>Outputs a cd command to navigate to the worktree.
gwik cd feature-login
# cd /path/to/repo/.worktrees/feature-login
With shell integration, this automatically changes directory.
gwik init <shell>Outputs shell integration code.
# Add to your .bashrc or .zshrc
eval "$(gwik init bash)"
eval "$(gwik init zsh)"
Shell integration enables:
cd after gwik open, gwik close, gwik cd~/.config/gwik/config.toml
# Directories to scan for `gwik list --all`
roots = [
"~/dev",
"~/work",
]
# Default worktree directory (optional)
worktree_dir = ".worktrees"
.git/gwik.toml (per-repository)
# Override worktree directory for this repo
worktree_dir = ".git/.worktrees"
# Commands to run after creating a worktree
cmds = [
"cp $SRC/.env $DST/.env",
"cd $DST && npm install",
]
Post-creation commands:
$SRC - path to the main repository$DST - path to the newly created worktreeBy default, worktrees are created under .worktrees/:
repo/
├── .git/
├── .worktrees/
│ ├── .gitignore # Auto-created, contains "*"
│ ├── feature-login/
│ └── bugfix-auth/
└── src/
Set worktree_dir = ".git/.worktrees" to keep worktrees inside .git/ (no .gitignore needed).
MIT