Skip to content

Betamax

Rust-first terminal capture

Betamax

VHS-style GIFs, screenshots, videos, and terminal snapshots without a browser, terminal server, xterm.js, or ttyd process.

Animated terminal demo generated by Betamax

Betamax reads tape files, runs commands in a real PTY, feeds terminal output through libghostty-vt, rasterizes frames in process with cosmic-text and swash, and writes artifacts for documentation or tests.

GIFs And Screenshots

Generate README demos, release-note animations, final-frame PNGs, and checkpoint screenshots.

Terminal Testing

Wait for text, capture terminal state, and compare viewport, scrollback, and style spans in snapshot tests.

Ghostty-Based Parsing

Terminal output is interpreted by libghostty-vt, with copied Ghostty themes available by name.

Small Architecture

No xterm.js, no browser, no terminal server, no ttyd process. MP4 and WebM use ffmpeg only for video encoding.

Betamax is intentionally small because it relies on focused upstream projects for terminal parsing, text shaping, PTY execution, and documentation.

Output examples/output/basic.gif
Output examples/output/basic.state.json
Set Theme "Aardvark Blue"
Set FontSize 28
Set Width 900
Set Height 480
Set WindowBar Colorful
Hide
Type "cargo build --quiet"
Enter
Wait
Show
Type "printf 'hello from betamax\n'"
Enter
Wait+Screen "hello from betamax"
Screenshot examples/output/checkpoint.png

Hide and Show keep setup work out of the rendered output, while waits make tapes stable when programs do real work.

  • Quick Start covers installation, betamax new, betamax run, validation, and theme listing.
  • Examples links every checked-in tape to the behavior it demonstrates.
  • Tape Files explains tape structure, command ordering, tokenization, waits, hidden work, and shell defaults.
  • Outputs explains GIF, PNG, video, frame-directory, screenshot, and state artifacts.
  • Tape Reference is the command, setting, default, and CLI reference.
  • Terminal Testing and State JSON cover the snapshot-testing use case.