wt-cli stores its configuration at ~/.config/wt/config.json (or $XDG_CONFIG_HOME/wt/config.json).
{
"command": "claude --dangerously-skip-permissions"
}| Option | Type | Default | Description |
|---|---|---|---|
command |
string | "" |
Command to run after creating a new worktree |
Run Claude Code in new worktrees:
{
"command": "claude --dangerously-skip-permissions"
}Open VS Code in new worktrees:
{
"command": "code ."
}No automatic command:
{
"command": ""
}Projects can define worktree-specific scripts in .cursor/worktrees.json:
{
"setup-worktree": [
"npm install",
"cp .env.example .env"
],
"up": [
"docker-compose up -d",
"npm run dev &"
],
"down": [
"docker-compose down"
],
"cleanup-worktree": [
"rm -rf node_modules"
]
}Array of commands run after creating a worktree (always). Useful for:
- Installing dependencies
- Setting up environment files
Array of commands run with wt up or wt new -u. Useful for:
- Starting Docker containers
- Starting dev servers
- Opening editors
Array of commands run with wt down. Useful for:
- Stopping Docker containers
- Stopping dev servers
Array of commands run before removing a worktree (always). Useful for:
- Cleaning up build artifacts
- Removing generated files
| Variable | Description |
|---|---|
NO_COLOR |
Disable colored output (see https://no-color.org/) |
XDG_CONFIG_HOME |
Override default config directory |