Skip to content

v0.2.0 — record it, replay it, embed it

Choose a tag to compare

@github-actions github-actions released this 05 Jul 15:23

terminal-svg can now record. Run terminal-svg rec, do your thing, exit the shell — and out comes an animated SVG replaying the whole session: GIF-quality demos at a fraction of the size, with real selectable text, that play anywhere an <img> tag does. GitHub READMEs included, no JavaScript. The image below is one — 42 KB, font embedded.

animated terminal-svg demo

Highlights

  • terminal-svg rec — records a live interactive session (your $SHELL, or rec -- <command>) on a real PTY at your current terminal size, keystrokes forwarded, window resizes captured. Exit the session and the animated SVG is rendered on the spot.
  • asciicast v2 in and out — every recording is saved as a standard asciicast next to the SVG (asciinema play demo.cast just works), and any .cast file renders directly: re-theme or re-time a take without re-recording, or render recordings you already made with asciinema (terminal-svg session.cast -t github-dark).
  • Replays that stay small — output bursts coalesce to ≤30 fps, pauses are capped at 2 s (--idle-time-limit), identical frames are dropped, and repeated rows are shared across frames via <defs>/<use>. A 120-line scrolling build log lands around 130 KB — font included.
  • Plays everywhere — frames are toggled by plain CSS keyframes with step-end timing inside the SVG itself: crisp discrete frames, no cross-fading, no scripts, loops forever with a hold on the last frame. --speed to taste, --no-loop to play once and freeze, --static for just the final screen.
  • The details still matter — a soft block cursor tracks the session, carriage-return progress bars and spinners replay exactly as they ran, mid-session window resizes grow the canvas, and per-frame font subsetting covers every glyph the whole recording touches.

Everything from 0.1.0 is untouched: the static screenshot CLI is byte-for-byte compatible, golden-tested to prove it.

Install

brew install russmckendrick/tap/terminal-svg

Or grab a binary below (macOS arm64/amd64, Linux arm64/amd64, Windows amd64 — each with a SHA-256 checksum). rec is macOS/Linux only for now; rendering .cast files works everywhere.

Quick start

terminal-svg rec -o demo.svg        # exit the shell to finish
terminal-svg demo.cast --speed 2 -t nord -o demo-nord.svg

Docs: README · theme format · how it works

Bundled JetBrainsMono Nerd Font faces are under the SIL OFL; the code is MIT.

Full Changelog: v0.1.0...v0.2.0