Runbooks
Runbooks are Pro command sequences you can save, edit, and replay — handy for repeated project tasks that need the same commands in the same order. Every step still runs through the security gate.
Capture recent commands
- Type
/runbook save-last <N>(for example/runbook save-last 5), or press⌘⌥R, or use Save as runbook from the history browser. - AITerm cleans up the capture: it drops blanks and pure-inspection commands (
ls,pwd,clear, history, and the like), collapses repeats, and suggests{{variables}}for values that recur. - The result opens in the editor as a draft — review it before saving, especially if a command contains local paths or project-specific values. Secret-looking captured values are redacted in generated suggestions.
The Runbooks library
Press ⌘⇧R to open the Runbooks library. Each runbook shows its name and step count, with actions: Run, Edit, Duplicate, and Delete. Use New to start an empty one, or Done to close.
Editing
In the editor a runbook has a Name, an optional Description, and a list of Steps. Each step is one command; the field hint is "command (use {{name}} for variables)". Use Add step to add more, the minus button to remove one, and Save (Return) or Cancel (Esc). Detected variables are listed under the steps.
Running
When you run a runbook, AITerm evaluates each resolved step — not the raw template — through the security gate. The run panel shows each step's result (succeeded, failed, skipped, or blocked) and a status line:
- Run step / Skip while a step waits.
- Running… while it executes.
- On a failure: "Step failed — fix it, retry, skip, or abort," with Fix with AI, Retry, and Skip.
- A summary when it finishes, or "Aborted." if you abort.
Output chaining
A later step can reference an earlier step's output with {{stepN.output}} (for example deploy --id {{step1.output}}). The placeholder is resolved only when that step is about to run, using the real captured output — and the resolved command is then re-checked through the security gate. That means an earlier step's output can never smuggle a command past the gate: whatever the substitution produces is assessed before it runs.
Dry Run mode prevents runbooks from executing until you turn it off.
Related pages: Slash Commands Reference, Safety and Security, History and Search.