Commands
All examples use the ww alias. willow and ww are interchangeable.
ww clone <url> [name]
Bare-clone a repo and create an initial worktree on the default branch. Required entry point — all willow-managed repos must be set up via ww clone.
ww clone git@github.com:org/repo.git
ww clone git@github.com:org/repo.git myrepo # custom name
ww clone git@github.com:org/repo.git --force # re-clone from scratch| Flag | Description | Default |
|---|---|---|
--force | Remove existing repo and re-clone from scratch | false |
What happens under the hood:
git clone --bare <url> ~/.willow/repos/<name>.git- Configure remote fetch refs
git fetch origin- Create an initial worktree on the default branch
ww new <branch> [flags]
Create a new worktree with a new branch.
ww new feature/auth # create worktree
ww new feature/auth -b develop # fork from specific branch
ww new -e existing-branch # use existing branch
ww new feature/auth -r myrepo # target a specific repo
wwn feature/auth # create + cd (shell integration)| Flag | Description | Default |
|---|---|---|
-b, --base | Base branch to fork from | Config default / auto-detected |
-r, --repo | Target repo by name | Auto-detected from cwd |
-e, --existing | Use an existing branch | false |
--no-fetch | Skip fetching from remote | false |
--cd | Print only the path (for scripting) | false |
ww sw
Switch worktrees via fzf. Shows Claude Code agent status per worktree, sorted by activity.
🤖 BUSY auth-refactor ~/.willow/worktrees/repo/auth-refactor
✅ DONE api-cleanup ~/.willow/worktrees/repo/api-cleanup
⏳ WAIT payments ~/.willow/worktrees/repo/payments
🟡 IDLE main ~/.willow/worktrees/repo/main
-- old-feature ~/.willow/worktrees/repo/old-featureActive agents sorted first, offline sorted last. Requires fzf.
ww rm [branch] [flags]
Remove a worktree. Without arguments, opens fzf picker.
ww rm auth-refactor # direct removal
ww rm # fzf picker
ww rm auth-refactor --force # skip safety checks
ww rm auth-refactor --prune # also run git worktree prune| Flag | Description | Default |
|---|---|---|
-f, --force | Skip safety checks | false |
--keep-branch | Keep the local branch | false |
-y, --yes | Skip confirmation | false |
--prune | Run git worktree prune after | false |
Safety checks (unless --force):
- Warns if there are uncommitted changes
- Warns if there are unpushed commits
- Prompts for confirmation
ww ls [repo]
List worktrees with status.
BRANCH STATUS PATH AGE
main IDLE ~/.willow/worktrees/myrepo/main 3d
auth-refactor BUSY ~/.willow/worktrees/myrepo/auth-refactor 2h
payments WAIT ~/.willow/worktrees/myrepo/payments 1d
old-feature -- ~/.willow/worktrees/myrepo/old-feature 5mWhen run outside a willow repo, lists all repos and their worktree counts.
| Flag | Description |
|---|---|
--json | JSON output |
--path-only | Paths only (one per line) |
ww status
Rich view of Claude Code agent status across all worktrees.
myrepo (4 worktrees, 2 agents active)
🤖 auth-refactor BUSY 2m ago
⏳ payments WAIT 30s ago
🟡 main IDLE 1h ago
old-feature --| Flag | Description |
|---|---|
--json | JSON output |
ww cc-setup
One-time hook installation for Claude Code status tracking.
- Creates the status directory:
~/.willow/status/ - Installs a hook script at
~/.willow/hooks/claude-status-hook.sh - Adds hook configuration to
~/.claude/settings.json
The hook fires on PostToolUse and Stop events, writing status to ~/.willow/status/<repo>/<worktree>.json.
ww shell-init [flags]
Print shell integration script.
eval "$(willow shell-init)" # bash / zsh
willow shell-init | source # fish
eval "$(willow shell-init --tab-title)" # with tab titles| Flag | Description |
|---|---|
--tab-title | Include terminal tab title hook |
Agent status
After running ww cc-setup, Claude Code automatically reports its state:
| Icon | Status | Meaning |
|---|---|---|
| 🤖 | BUSY | Agent is actively working |
| ✅ | DONE | Agent finished its turn |
| ⏳ | WAIT | Agent is waiting for user input |
| 🟡 | IDLE | Agent session ended |
-- | No activity detected |
Stale BUSY/DONE status (>5 min) automatically degrades to IDLE.
Aliases
| Alias | Command |
|---|---|
ww n | ww new |
ww l | ww ls |
ww s | ww status |
Global flags
-C <path> Run as if willow was started in <path>
--verbose Show git commands being executed
--no-color Disable colored output