A tmux-native TUI for managing git worktrees. Browse worktrees, preview live session content, and switch between them — all without leaving your terminal.
Orchard runs as a persistent named tmux session. Each worktree you open becomes its own tmux session. The orchard session stays alive in the background, auto-refreshing every 60 seconds, and you can jump back to it at any time with ^B o.
orchard session (persistent, auto-refreshing)
├── worktree list + live preview
└── ^B o from any worktree session returns here
feat/login session
├── your shell / editor / claude
└── status bar: branch PR#42 ◌ review │ ^B o orchard ^B ( prev ...
- Worktree list with branch, PR status, and review state
- Live pane preview — see what's running in each session before switching
- Switch sessions with Enter — creates the session if it doesn't exist
- Remote worktrees — browse and jump into remote tmux sessions over SSH or mosh
- Worktree transfer — push/pull worktrees between local and remote machines
- Merge conflict detection — shows conflicts as top-priority status badge
- Issue tracking — links worktrees to GitHub issues and shows issue state
- Consistent tmux UI — every session gets the same styled status bar with a cheatsheet
- PR status from GitHub — failing CI, unresolved threads, changes requested, approved
- Open PRs in browser — jump straight to GitHub
- Delete worktrees with confirmation
- Batch cleanup — remove all worktrees with merged/closed PRs
- Auto-refresh — list updates in the background every 60s
- JSON output —
--jsonflag for machine-readable worktree data
npm install -g git-orchardgit-orchard initAdd the printed shell function to your ~/.zshrc or ~/.bashrc, then reload:
source ~/.zshrcThis creates an orchard command that creates and attaches to the persistent orchard tmux session. Always use orchard, not git-orchard directly.
orchard # Open the orchard session (creates it if needed)
orchard cleanup # Jump straight to cleanup view
orchard init # Print shell function
orchard --json # Output worktree data as JSON and exit| Key | Action |
|---|---|
↑ / ↓ |
Navigate worktrees |
1-9 |
Jump to worktree by number |
enter |
Switch to worktree tmux session (creates if needed) |
o |
Open PR in browser |
p |
Push/pull worktree to/from remote |
d |
Delete selected worktree |
c |
Cleanup worktrees with merged/closed PRs |
r |
Refresh list |
q |
Quit |
| Binding | Action |
|---|---|
^B o |
Switch to orchard session |
^B ( / ^B ) |
Previous / next session |
^B % |
Split pane vertically |
^B " |
Split pane horizontally |
^B ←→ |
Navigate panes |
^B z |
Zoom pane |
^B x |
Close pane |
^B d |
Detach session |
Orchard can display and manage worktrees on a remote machine. Configure a remote in .git/orchard.json (or .git/modules/<name>/orchard.json for submodules):
{
"remote": {
"host": "ubuntu@10.0.3.56",
"repoPath": "~/project/bare-repo",
"shell": "mosh"
}
}| Field | Description |
|---|---|
host |
SSH host (user@hostname) |
repoPath |
Path to the bare repo on the remote |
shell |
"ssh" (default) or "mosh" for the connection |
Press Enter on a remote worktree to open a local tmux session that connects to the remote tmux session via SSH/mosh. Press p to transfer a worktree between local and remote.
- Node.js 18+
- Git
- tmux
- GitHub CLI (
gh) — optional, for PR status
- Fork the repo and create a feature branch
- Follow SOLID, KISS, YAGNI, and CUPID principles
- Write tests for pure functions (BetterSpecs style)
- Run
npm testand make sure everything passes - Open a PR
npm install
npm test # Run tests
npm run build # Compile TypeScriptMIT