Command-line tool for recording and live streaming terminal sessions to lightweight asciicast files
asciinema is a terminal session recorder that captures command-line activity into lightweight .cast files using the asciicast format. Unlike traditional screen recording software that produces heavyweight video files, asciinema runs inside the terminal and records text-based output that compresses to roughly 8% of the original size.
The tool supports both recording to files and real-time streaming of terminal sessions. Recordings can be replayed directly in a terminal with adjustable playback speed, looping, and step-by-step navigation. Live streaming works through a built-in HTTP server for local viewing or via remote relay servers like asciinema.org for broader sharing. Sessions can be simultaneously recorded and streamed.
Key capabilities include keyboard input capture, environment variable logging, session concatenation, and mid-session controls through customizable key bindings. The tool supports conversion between asciicast versions and export to raw terminal output or plain text. Recordings capture metadata including terminal size, theme, and command details, while headless mode enables scripted usage in CI environments.
Written in Rust, asciinema targets developers, DevOps engineers, and technical educators who need to document terminal workflows, create tutorials, or share debugging sessions. It runs on GNU/Linux, macOS, and FreeBSD, with recordings playable in terminals or embeddable in web pages through the asciinema player.
# via Cargo
cargo install --locked --git https://github.com/asciinema/asciinema