// Guidance for Worktrunk, a CLI tool for managing git worktrees. Covers configuration (user config at ~/.config/worktrunk/config.toml and project hooks at .config/wt.toml), usage, and troubleshooting. Use for "setting up LLM", "configuring hooks", "automating tasks", or general worktrunk questions.
| name | worktrunk |
| description | Guidance for Worktrunk, a CLI tool for managing git worktrees. Covers configuration (user config at ~/.config/worktrunk/config.toml and project hooks at .config/wt.toml), usage, and troubleshooting. Use for "setting up LLM", "configuring hooks", "automating tasks", or general worktrunk questions. |
Help users work with Worktrunk, a CLI tool for managing git worktrees.
For general usage, consult reference/README.md. For configuration, follow the workflows below.
Worktrunk uses two separate config files with different scopes and behaviors:
~/.config/worktrunk/config.toml)~/.config/worktrunk/config.toml (never checked into git)reference/user-config.md for detailed guidance.config/wt.toml)<repo>/.config/wt.toml (checked into git)reference/project-config.md for detailed guidanceWhen a user asks for configuration help, determine which type based on:
User config indicators:
Project config indicators:
Both configs may be needed: For example, setting up LLM integration requires user config, but automating quality checks requires project config.
Most common request. Follow this sequence:
Check if LLM tool exists
which llm # or: which aichat
If not installed, guide installation (don't run it)
uv tool install -U llm
Guide API key setup (don't run it)
llm install llm-anthropic
llm keys set anthropic
llm models default claude-haiku-4-5-20251001
Propose config change
[commit-generation]
command = "llm"
Ask: "Should I add this to your config?"
After approval, apply
wt config listwt config createSuggest testing
llm "say hello"
wt merge # in a repo with uncommitted changes
See reference/user-config.md for complete details.
Common request for workflow automation. Follow discovery process:
Detect project type
ls package.json Cargo.toml pyproject.toml
Identify available commands
package.json scriptsDesign appropriate hooks
post-createpre-commit or pre-mergepost-startValidate commands work
npm run lint # verify exists
which cargo # verify tool exists
Create .config/wt.toml
# Install dependencies when creating worktrees
post-create = "npm install"
# Validate code quality before committing
[pre-commit]
lint = "npm run lint"
typecheck = "npm run typecheck"
# Run tests before merging
pre-merge = "npm test"
Add comments explaining choices
Suggest testing
wt switch --create test-hooks
See reference/project-config.md for complete details.
reference/user-config.md#llm-setupreference/user-config.md#worktree-pathsreference/user-config.md#templatesreference/user-config.md#troubleshootingreference/project-config.md#new-projectreference/project-config.md#add-hookreference/project-config.md#variablesreference/project-config.md#formatsreference/project-config.md#troubleshooting# View all configuration
wt config list
# Create initial user config
wt config create
# LLM setup guide
wt config --help
Load reference/README.md for general features, installation, commands, and examples.
Load reference files for detailed configuration, hook specifications, and troubleshooting.
Find specific sections with grep:
grep -A 20 "## Installation" reference/README.md
grep -A 20 "## LLM Setup" reference/user-config.md
grep -A 30 "### post-create" reference/project-config.md