CLI commands
Commands at a glance
Section titled “Commands at a glance”| Command | Purpose |
|---|---|
birch worktree new | Create a new worktree, optionally from a ticket/PR reference. |
birch worktree list | List all worktrees for the current repo. |
birch worktree open | Open a worktree in your default editor. |
birch worktree remove | Remove a worktree (cleans up the folder and the linked ref). |
birch commit suggest | Print an AI-generated commit message for the staged diff. |
birch repo init | Initialize a new worktree-laid-out repo. |
birch repo migrate | Convert a classic checkout to the worktree layout (same as the GUI migration). |
Global flags
Section titled “Global flags”--json— emit machine-readable output (see JSON output).--quiet,-q— suppress informational logs; only print warnings and errors.--repo <path>— operate on a specific repo (default: walk up from current directory).--no-color— disable ANSI colors. Also honored when$NO_COLORis set.
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
0 | Success |
1 | Generic error |
2 | Invalid CLI usage |
10 | Repo not found or not a Birch-managed layout |
11 | Worktree already exists |
20 | Ticket-tracker request failed (network, auth) |