Skip to content

asciinema

Records a terminal session into a small text file that replays as real, selectable text.

Homebrew formula

What it does

asciinema records stdin/stdout timing into a .cast file — JSON, not video. Playback is a real terminal replay: text can be selected and copied, the file is a few kilobytes instead of megabytes, and it diffs.

asciinema rec demo.cast
asciinema play demo.cast
asciinema play -s 2 -i 0.5 demo.cast   # 2x speed, cap idle at 0.5s
asciinema upload demo.cast

Embedding

Casts can be self-hosted with the asciinema-player JavaScript component, or uploaded to asciinema.org. For documentation, a cast beats a GIF: smaller, copyable, and readable at any zoom level.

Alternative to

AlternativeTypeTrade-off
VHSOpen sourceCharm’s tool: scripted, deterministic recordings that produce GIFs
t-rec and terminalizerOpen sourceRecord to GIF directly, larger files
Gifski plus a screen recordingOpen sourceThe brute-force route, and it looks fine
script(1)Built inCaptures the text without timing, already installed

Install

brew install asciinema

Links

This post is licensed under CC BY 4.0 by the author.
Last updated on