CLI overview
The Birch Code CLI is a companion to the desktop app. It does two things the GUI can’t easily do:
- Integrates with your issue tracker. Given a ticket or PR number, it figures out the right branch name and creates a worktree for it.
- Scripts. Every command supports
--jsonso you can pipe its output into hooks, CI, or other tools.
Installation
Section titled “Installation”The birch binary is bundled with the desktop app:
- macOS:
/Applications/Birch.app/Contents/Resources/cli/birch - Windows:
<install-dir>\cli\birch.exe
Add that path to your $PATH (or %PATH%) and you’re set. A future installer will wire this up automatically.
Quick examples
Section titled “Quick examples”Create a worktree for GitHub issue #42:
birch worktree new --from gh:42Create a worktree for a GitLab MR:
birch worktree new --from gl:!137List all worktrees as JSON (great for status bars and shell prompts):
birch worktree list --jsonOpen a worktree in your default editor:
birch worktree open feature-authSupported issue trackers
Section titled “Supported issue trackers”| Prefix | System |
|---|---|
gh: | GitHub issues and PRs |
gl: | GitLab issues and MRs |
az: | Azure DevOps work items |
lin: | Linear tickets |
See Commands for the full reference and JSON output for machine-readable formats.