asciinema logo

asciinema

Command-line tool for recording and live streaming terminal sessions to lightweight asciicast files

install· Cargo

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.

Installation

# via Cargo
cargo install --locked --git https://github.com/asciinema/asciinema

asciinema CLI demo

Alternatives & related tools

add a badge to your README

Maintain asciinema? Show that it's featured on trmn. The badge links back to this page.

Featured on trmn
Markdown
[![Featured on trmn](https://www.trmn.sh/badge/asciinema.svg)](https://www.trmn.sh/tools/asciinema?utm_source=badge)
HTML
<a href="https://www.trmn.sh/tools/asciinema?utm_source=badge"><img src="https://www.trmn.sh/badge/asciinema.svg" alt="Featured on trmn" height="20"></a>