Skip to Content
agore-skill
ContributorHow to guides

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, ttyd and ffmpeg, both on PATH.
  • The CLI binary: mise run build produces bin/agore-skill.

The tapes

All tapes live in docs/vhs/ and render into docs/public/demos/:

TapeWhat it records
help.tapeagore-skill --help, then agore-skill create --help
create.tapeInteractive agore-skill create (huh form) and the generated tree
inspect.tapeagore-skill inspect — L1/L2/L3 budget panel with progress bars
lint-release.tapelint --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:vhs

The 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 Hide and Show the tape wipes and recreates a deterministic /tmp/agore-vhs-<name> workspace, runs git init -q -b main and agore-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" — $PWD is the directory vhs was invoked from, which is why rendering must happen at the repository root. Relative Output paths also resolve against it.
  • Neutral prompt. export PS1='$ ' keeps the frames free of machine names and paths.
  • Color settings. Env COLORTERM "truecolor" and Env 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.png

Check: 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 $ command shorthand; every keystroke is Type "…" + Enter, and quotes inside strings need backtick literals (the lexer cannot escape ").
  • Wait+Line checks the cursor line — after a command that is the shell prompt — so wait on command output with Wait+Screen.
  • The huh form is timing-sensitive; keep the generous post-Enter sleeps.
  • 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.

On this page