Quick actions & commands
Launch an agent from a ticket, set up new worktrees, and save project scripts.
GridTree has three kinds of saved commands, each running at a different moment:
- Quick actions — run when you start work on a ticket, usually to launch a coding agent.
- Post-creation commands — run automatically every time a worktree is created.
- Templates — project scripts you run on demand.
You set all three up in GridTree's UI — you never have to write a config file by hand. Post-creation commands and templates are saved to your repo's .gridtree/config.json so they're shared with everyone who opens the project; quick actions are kept in your app settings. The JSON shown below is just what GridTree writes, for reference.
Quick actions#
A quick action is a command that runs when you create a worktree from a ticket — typically to launch a coding agent already pointed at that ticket. You set a default per source (Jira, GitHub issue, GitHub PR); when you start work from that source, GridTree runs its default, or you can pick another. GridTree ships presets for Claude Code, OpenCode, Gemini, and Codex.
Configure them under Settings → Quick Actions. They can be global or scoped to one project — they're an app setting, not part of the repo config.
The command can reference the ticket through variables:
claude "Implement {key}: {title}"Available variables include {key}, {title}, {description}, {type}, {priority}, {labels}, {url}, {branch}, and {worktreePath}. Use {promptFile:...} to write multi-line content to a temporary file and pass it to the agent as an argument.
You choose how the agent gets the ticket's context. The cleanest way is to pass just the key and let the agent fetch the rest through GridTree's built-in MCP server — for example claude "Implement {key}. Use the gridtree MCP server to fetch the details.". Since the command is only text you compose, you can also hand the agent the content directly with {description} or {promptFile:...}, or lean on whatever integration your agent already has.
Post-creation commands#
These run, in order, right after a worktree is created — perfect for getting a fresh checkout ready: install dependencies, copy a local env file, generate types.
{
"postCreationCommands": [
{ "name": "Install", "command": "npm install", "continueOnError": false, "order": 0 },
{ "name": "Copy env", "command": "cp {main_repo_path}/.env ./", "continueOnError": true, "order": 1 }
]
}name— label shown while the command runs.command— the shell command, run in the new worktree directory.order— commands run from low to high.continueOnError— whentrue, a failure doesn't stop the commands that follow.
GridTree runs them in sequence and shows progress for each one. You can skip them for a given worktree when you create it.
Templates#
Templates are reusable project scripts you run on demand in a worktree — npm install, a dev server, Storybook, a test watcher, a lint pass. Each opens in a terminal pane.
{
"templates": [
{ "name": "Dev server", "command": "npm run dev", "runMode": "visible", "category": "Run", "order": 0 },
{ "name": "Typecheck", "command": "npm run typecheck", "runMode": "background", "order": 1 }
]
}name/command— label and the command to run.runMode—visibleopens a terminal pane you can watch;backgroundruns it without taking a pane.workingDirOffset— optional path relative to the worktree root to run in (for monorepo subfolders).category/order— group and sort templates in the picker.