docs.shots¶
Run the CLI on a pseudo-terminal and save a framed SVG screenshot.
Runs <cmd> <argv…> on a real pty — colours, receipts, taught errors,
exactly as a terminal shows them — collapses live rewrites to their
final frame, and renders the capture with rich as an SVG in a
macOS-style window. Regenerate on every docs build and a screenshot
can never drift from the CLI: it is the CLI.
The command really executes, so don't screenshot tasks whose side effects you don't want. A failing command still renders — a taught error message is a perfectly good screenshot.
| Parameter | Type | Default | Description |
|---|---|---|---|
<argv>... |
variadic | ||
--out=PATH |
path | required | the SVG file to write |
--width=INT |
int | 72 |
terminal columns |
--cmd=VALUE |
"fm" |
executable to run | |
--title=VALUE |
window title |
Returns: a list of text