VHS tapes for the README/docs demo GIFs. Each tape is deterministic and
rerunnable: hidden setup reseeds the database state it needs, so a re-render
after a CLI output change is just make demos (or vhs <tape> from this
directory).
- VHS (
brew install vhs) - A built binary:
make build - The compose database for the database-backed tapes:
make db-up(lint.tapeis fully offline)
Declarative diff for a table absent from the live database: the full desired schema planned as a diagnostic report with the greenfield note.
Dry-run of a blocking ADD CONSTRAINT … UNIQUE, the real run executing
the safer online sequence, \d users catalog proof — then the declarative
loop: diff --desired plans the remaining change, migrate executes it,
diff confirms convergence.
error[rewrite-required] refusal with typed note/help diagnostics and
doc anchors, then echo $? showing the exit-code contract (2).
Offline lint of a two-statement change file — unset PGSPRITE_URL on
camera to show no database is needed.
make build db-up
make demosThe GIFs are committed next to the tapes so the README renders without any
build step. Nothing pins them: renderer tests pin
docs/cli-output-examples.md and the contract docs, and CI's demo smoke
test asserts on demo/tour.sh output, but the README samples and these
GIFs drift silently when CLI output changes — re-rendering is a manual
duty, done in the same change that alters the output. Each re-render
commits whole new binary blobs (no deltas), so re-render only the tapes
whose recorded output actually changed; if the accumulated weight starts
to bite, the GIFs move to release assets.
- The tape parser has no escapes inside
"..."— use backtick strings for commands containing double quotes;\ntypes literally (use oneechoper line instead ofprintf '\n'; a single\dis fine for psql). - Keep a
Sleepbetween the hiddenclearandShow, or capture resumes before the screen clears and setup commands leak into the first frames. - The prompt is set in hidden setup so recorded frames show only the command and its output.
- Color needs defending from the rendering machine's environment: every tape
sets
Set Theme "Dracula"for consistent frames and runs a hiddenunset NO_COLOR && export TERM=xterm-256color, or aNO_COLORin the renderer's dotfiles silently strips the palette from the recording. - Escape codes in the prompt must be wrapped in
\[…\]or readline miscounts the prompt width, and the hiddentrap 'printf "\033[0m"' DEBUGresets the typed command's input style before each command runs, so output renders in the theme's default color instead of bleeding the prompt's.