Skip to content

Snippets and Runbooks

Se.Cherkasov edited this page Aug 23, 2026 · 1 revision

Snippets and runbooks

English · Русский

A snippet is one command sent to the active session. A runbook is an ordered procedure run in one session's shell, step by step. Both use the same ${{…}} variables and both show you the exact line before anything is sent.

Snippets

The library lives in the Snippets rail section; Ctrl+Shift+S opens the palette over the active session with type-ahead. Snippets can be filed into folders, tagged, and given a note.

A snippet run always goes through a confirmation that quotes the resolved command. A row that cannot show the whole line is never the surface that runs it — the confirmation is.

Variables

Syntax is ${{name}} or ${{name:format}}; a name starts with a letter and may hold letters, digits, _ and -. Anything malformed stays literal, so ordinary shell syntax ($VAR, ${VAR}, $(cmd), $$) is never touched. Placeholders resolve at run time:

Placeholder Value
${{date}} date of the run, YYYY-MM-DD; format tokens after a colon (YYYY, YY, MM, DD, HH, mm, ss)
${{time}} time of the run, HH:mm:ss; same format tokens
${{timestamp}} Unix time of the run, in seconds
${{uuid}} a random UUID
${{random}} random characters; length (64 max) and charset after the colon — alnum, hex, special
${{clipboard}} the system clipboard, read once at the confirmation
${{vault:name}} a password or public key from the vault, by entry name — masked in every preview
${{anything-else}} any other valid name prompts for a value before the run; the part after a colon is the prefilled default
${{name:opt1|opt2}} a prompted parameter whose format is an option list becomes a picker; the first entry is the default

Runbooks

A runbook's steps are commands or SFTP transfers. Exit codes decide how the run continues, and ${{…}} values are collected once at the start and shared by every step — so a ${{uuid}} drawn in step 2 names the same thing in step 5, and a file named after it in one step is the file uploaded in the next.

Step options

Option Effect
confirm pauses before the step until you approve it
continue a failure is recorded and the run continues
interactive the line is sent as-is and you finish the step yourself — for TUI programs and menus that hold the terminal

By default a non-zero exit code stops the run.

The run panel

One run is in flight app-wide. The panel shows each step's state, duration and output, and the run is written to a log (Runbooks → history) with how it ended. Step boundaries are detected out of band, so what the runner reads is the step's own output rather than a guess parsed from the screen.

Where they live

Snippets, runbooks and run logs are vault records: encrypted at rest, synced to your other devices, restorable from the trash for 30 days, and shareable with a team.

Production

If the session's host is tagged #prod, running a snippet asks first, and risky commands ask a second time — see Monitoring and production guard.

Clone this wiki locally