Skip to content

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.

bash
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
FlagDescriptionDefault
--forceRemove existing repo and re-clone from scratchfalse

What happens under the hood:

  1. git clone --bare <url> ~/.willow/repos/<name>.git
  2. Configure remote fetch refs
  3. git fetch origin
  4. Create an initial worktree on the default branch

ww new <branch> [flags]

Create a new worktree with a new branch.

bash
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)
FlagDescriptionDefault
-b, --baseBase branch to fork fromConfig default / auto-detected
-r, --repoTarget repo by nameAuto-detected from cwd
-e, --existingUse an existing branchfalse
--no-fetchSkip fetching from remotefalse
--cdPrint 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-feature

Active agents sorted first, offline sorted last. Requires fzf.

ww rm [branch] [flags]

Remove a worktree. Without arguments, opens fzf picker.

bash
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
FlagDescriptionDefault
-f, --forceSkip safety checksfalse
--keep-branchKeep the local branchfalse
-y, --yesSkip confirmationfalse
--pruneRun git worktree prune afterfalse

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      5m

When run outside a willow repo, lists all repos and their worktree counts.

FlagDescription
--jsonJSON output
--path-onlyPaths 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            --
FlagDescription
--jsonJSON output

ww cc-setup

One-time hook installation for Claude Code status tracking.

  1. Creates the status directory: ~/.willow/status/
  2. Installs a hook script at ~/.willow/hooks/claude-status-hook.sh
  3. 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.

bash
eval "$(willow shell-init)"          # bash / zsh
willow shell-init | source           # fish
eval "$(willow shell-init --tab-title)"  # with tab titles
FlagDescription
--tab-titleInclude terminal tab title hook

Agent status

After running ww cc-setup, Claude Code automatically reports its state:

IconStatusMeaning
🤖BUSYAgent is actively working
DONEAgent finished its turn
WAITAgent is waiting for user input
🟡IDLEAgent session ended
--No activity detected

Stale BUSY/DONE status (>5 min) automatically degrades to IDLE.

Aliases

AliasCommand
ww nww new
ww lww ls
ww sww status

Global flags

-C <path>       Run as if willow was started in <path>
--verbose       Show git commands being executed
--no-color      Disable colored output