@ishakantony/wt-cli
v0.1.0
Published
A Bun-powered Git worktree workflow helper.
Downloads
79
Readme
wt-cli
wt is a Bun-powered CLI for fast Git worktree workflows. It wraps common git worktree operations with concise commands, readable output, and optional shell integration for jumping into created or selected worktrees.
Requirements
- Bun 1.0 or newer
- Git
- zsh or bash for optional shell integration
Installation
npm install -g @ishakantony/wt-cliAfter installation, the package exposes two binaries:
wt: the user-facing commandwt-bin: the underlying binary used by shell integration
Quick Start
Show the command reference:
wtCreate a new branch worktree:
wt new feature/my-changeList worktrees:
wt list
wt lsJump to a worktree path:
wt cd feature-my-changeWithout shell integration, wt cd prints the path. With shell integration, it changes the current shell directory.
Shell Integration
Install shell integration for zsh or bash:
wt initThen restart your shell or source your shell config. After shell integration is active, commands such as wt new, wt review, and wt cd can change your current directory.
Remove shell integration:
wt init --uninstallCommands
wt new <branch> create a branch worktree
wt review <branch> create a detached review worktree
wt remove <name> remove a worktree
wt rm <name> alias for remove
wt list list worktrees
wt ls alias for list
wt cd <name> print or jump to a worktree path
wt dir show worktree directory configuration
wt info show repository/worktree context
wt prune prune stale worktree metadata
wt init install shell integration
wt help show command referenceConfiguration
wt uses WT_DIR to choose where linked worktrees are created.
If WT_DIR is unset, it defaults to .., resolved relative to the Git repository root.
Example:
export WT_DIR="$HOME/worktrees"Inspect the effective configuration:
wt dir
wt infoDevelopment
Install dependencies:
bun installRun tests:
bun testRun typechecking:
bun run typecheckRun the CLI from source:
bun run src/wt.tsPreview the npm package contents:
npm pack --dry-runLicense
MIT
