Practical recipes for common Worktrunk workflows.
Alias for new worktree + agent
Create a worktree and launch Claude in one command:
Eliminate cold starts
post-create hooks install deps and copy caches. On macOS, use copy-on-write for instant cache cloning:
[]
= "cp -c -r ../.cache .cache" # APFS clones (instant, no disk space)
= "npm ci"
See Worktrunk's own .config/wt.toml for a complete example.
Local CI gate
pre-merge hooks run before merging. Failures abort the merge:
[]
= "uv run ruff check"
= "uv run pytest"
This catches issues locally before pushing β like having CI run on your machine.
Track agent status
Custom emoji markers show agent state in wt list. The Claude Code plugin sets these automatically:
+ feature-api β π€ β1 ./repo.feature-api
+ review-ui ? β π¬ β1 ./repo.review-ui
π€β Claude is workingπ¬β Claude is waiting for input
Set status manually for any workflow:
See Claude Code Integration for plugin installation.
Monitor CI across branches
Shows PR/CI status for all branches, including those without worktrees. CI indicators are clickable links to the PR page.
JSON API
Structured output for dashboards, statuslines, and scripts. See wt list for query examples.
Task runners in hooks
Reference Taskfile/Justfile/Makefile in hooks:
[]
= "task install"
[]
= "just test lint"
Shortcuts
Special arguments work across all commandsβsee wt switch for the full list.
Stacked branches
Branch from current HEAD instead of main:
Creates a worktree that builds on the current branch's changes.