SCH Worktree Manager
The sch command manages git worktrees for running multiple parallel coding agents on a large monorepo.
Commands
| Command | Description |
|---|---|
sch status | Show worktree status table |
sch new <base> <desc> | Create a new worktree |
sch remove <name> | Remove a worktree |
sch next | Open the next worktree needing attention |
sch config <name> <action> | Manage worktree configuration |
sch test <name> | Checkout worktree in bento for QA testing |
sch tui | Open interactive TUI |
sch window <cmd> | Manage Cursor windows |
Creating Worktrees
sch new <base> <description> [--provider <cursor|claude|cursor-cli>]
Base worktrees (prefixed with @) have pre-configured sparse checkouts:
| Base | Working Directory | Use For |
|---|---|---|
@sage | sage/sage-backend | Backend features |
@store | customers/store | Frontend features |
@migrations | tools/migrations | Database migrations |
@github | .github | GitHub Actions/config |
Example: sch new sage add-recipe-endpoint
Checking Status
sch status
Output the results exactly without modifications. If status shows:
- •Merged PRs: Ask if user wants to remove those worktrees
- •Expired PRs not paused: Ask if you should pull latest master, merge into expired branches, and push
Removing Worktrees
sch remove <worktree-name> [--force]
Use --force for worktrees with uncommitted changes.
Configuration
sch config <worktree-name> <action>
Actions:
- •
pause/unpause- Paused worktrees show "P" and are skipped bysch next - •
qa- Record current commit from~/carrotas QA'd - •
provider <cursor|claude|cursor-cli>- Set the coding agent - •
remove- Clean up config entry
Opening Next Worktree
When user says "next":
sch next
Opens the most appropriate link for the first worktree needing attention.
Window Management
sch window <command> [args]
Commands: list, minimize <pattern>, restore <pattern>, focus <pattern>, close <pattern>, missing, close-missing
User Testing Workflow
When user wants to test/QA a worktree:
sch test <worktree-name>
This checks out the worktree's commit in ~/carrot (bento) as a detached HEAD. After testing:
sch config <worktree-name> qa