Record VHS demos
Re-render the terminal recordings embedded in the docs with the pinned VHS toolchain — tapes, temp workspace, theme and size budget.
The docs embed short terminal recordings ("demos") rendered by
VHS from .tape files. This guide
covers everything needed to re-render them after a CLI change, and the
conventions to follow when adding a new one.
The demos must show the real CLI, never a mockup. They are re-rendered from the current binary, so any command-surface change that alters help text or output must end with a re-render and a frame check.
Prerequisites
Entering the repository activates everything via mise:
- VHS 0.12.1 plus its two dependencies,
ttydandffmpeg, both onPATH. - The CLI binary:
mise run buildproducesbin/agore-skill.
The tapes
All tapes live in docs/vhs/ and render into docs/public/demos/:
| Tape | What it records |
|---|---|
help.tape | agore-skill --help, then agore-skill create --help |
create.tape | Interactive agore-skill create (huh form) and the generated tree |
inspect.tape | agore-skill inspect — L1/L2/L3 budget panel with progress bars |
lint-release.tape | lint --strict, a snapshot-only release, dist/ listing and checksums |
How to render
From the repository root (not from docs/):
mise run build
mise run docs:vhsThe task loops over docs/vhs/*.tape in glob order and runs vhs on each.
Each tape writes a GIF and an MP4 twin into docs/public/demos/ — the
docs embed the GIF, the landing page the MP4. While the directory holds no
tapes the task prints a notice and exits 0, so it stays safe in earlier
phases of a checkout.
Conventions every tape follows
Read docs/vhs/README.md and the comments at the top of any tape before
writing a new one; the essentials:
- Hidden setup, visible demo. Between
HideandShowthe tape wipes and recreates a deterministic/tmp/agore-vhs-<name>workspace, runsgit init -q -b mainandagore-skill init --yes, and only then does the recording begin. Nothing printed by a hidden command (including absolute/Users/...paths) may appear in a frame. - PATH pattern.
export PATH="$PWD/bin:$PATH"—$PWDis the directoryvhswas invoked from, which is why rendering must happen at the repository root. RelativeOutputpaths also resolve against it. - Neutral prompt.
export PS1='$ 'keeps the frames free of machine names and paths. - Color settings.
Env COLORTERM "truecolor"andEnv TERM "xterm-256color"— without them huh and lipgloss render monochrome, which defeats the point of a demo. - Theme and sizing.
Set Theme "Catppuccin Mocha", 1280×640 px,FontSize 18,Framerate 24,TypingSpeed 50ms,CursorBlink false. FontSize 18 is deliberate: 22 wraps the ~108-column help and checksum output. - Embedding. Use the global
<VhsDemo>component (see Docs components); do not write raw<img>/<video>tags or link GIFs from Markdown.
Size budget and re-checking a render
Keep every GIF under 6 MB; today's recordings sit between ~50 KB and
~200 KB. If a re-render grows, shorten Sleeps or keystrokes before
touching Framerate or dimensions.
After rendering, spot-check frames instead of trusting the exit code:
ffmpeg -ss 5 -i docs/public/demos/create.gif -vframes 1 /tmp/frame.pngCheck: text is readable, colors are present, no secrets or home-directory
paths are visible, and the release demo shows v0.0.0-snapshot only.
Limitations
- VHS 0.12 has no
$ commandshorthand; every keystroke isType "…"+Enter, and quotes inside strings need backtick literals (the lexer cannot escape"). Wait+Linechecks the cursor line — after a command that is the shell prompt — so wait on command output withWait+Screen.- The huh form is timing-sensitive; keep the generous post-
Entersleeps. - JetBrains Mono is VHS's built-in default font family, so tapes do not set
FontFamily; renders are reproducible across machines for content, with only file mtimes differing.
Related
- The task wiring: Mise tasks (
docs:vhs). - Embedding component API: Docs components.
- Where the outputs land and how they are served: Docs stack.