One demo I couldn't record.
foley started as one demo. I was building a TUI that draws pixel art straight into the
terminal, went looking for a recorder, and found VHS,
which won me over on sight: write the demo as code, a .tape script instead of a
shaky screen recording. I still think that model is exactly right. But my app speaks the
kitty graphics protocol, and those pixels never arrived on the recording, because the screen
being filmed didn't speak it.
I loved the workflow and couldn't use it, so my first move was to fix it at the source: teach VHS the kitty graphics protocol. But VHS films an xterm.js terminal, and xterm.js doesn't render kitty graphics. Getting it there is a long road through a project that hasn't chosen to walk it, and waiting on that meant shelving the tape workflow indefinitely. The only route that kept both the authoring model and the pixels was to render the terminal myself.
When the frame is yours from the pty up, things stop being features you bolt on and start being consequences of the architecture:
- The input reel is almost free. foley is the one pressing the keys, so the track is emitted with exact timing, not captured and guessed at.
- A camera is just arithmetic. Every take renders from a supersampled master: push onto a region, hold, pull back, and the zoom is a 1:1 crop that is never blurry.
- The clock is virtual. The same tape produces byte-identical output on any machine, demos double as visual regression tests, and a ~32-second script exports in under 5.
- The set is closed. The recording never touches your real session: one cue builds a fresh HOME per take, and your machine stays off camera.
- Nobody else draws the screen. No browser offstage, no display server on set, so takes render headless anywhere CI runs, and the whole studio builds into a small container.
- A finished take is just frames. It screens anywhere: a gif in a README, an asciicast, golden text for CI, or live in your own terminal.
- And the kitty graphics that started all this render byte-exactly, because the engine underneath is a real terminal's.
So that's foley: VHS's authoring model, kept whole, plus the post-production that a rendered terminal makes possible.