asciinema(1)
Record and share terminal sessions as animated text files.
Synopsis
asciinema [COMMAND] [OPTIONS]Description
Asciinema is a lightweight, text-based approach to recording and sharing terminal sessions. It captures keystrokes and output timing, producing a compact JSON file that can be replayed in any browser or terminal without requiring video codecs.
The tool is useful for creating tutorials, documenting bug reports, sharing command workflows, and demonstrating software behavior. Recordings are small (typically kilobytes) and can be easily embedded in documentation or shared via URL.
Common options
| Flag | What it does |
|---|---|
rec [FILE] | Record a new terminal session; save to FILE (or asciinema.cast if omitted) |
play [FILE] | Play back a recorded session file in the terminal |
-c, --command | Run a specific command instead of starting an interactive shell |
-i, --idle-time-limit | Limit idle time between frames (in seconds, default: 2) |
-t, --title | Set the title for the recording session |
-w, --max-wait | Maximum wait time between frames in seconds (speeds up long pauses) |
--rows | Set terminal height in rows |
--cols | Set terminal width in columns |
-q, --quiet | Suppress informational messages during recording |
--overwrite | Overwrite the output file if it already exists |
upload [FILE] | Upload a recording to asciinema.org and get a shareable URL |
Examples
Start recording your terminal session to demo.cast; press Ctrl+D or exit to stop
asciinema rec demo.castRecord the output of a single command without starting an interactive shell
asciinema rec -c 'ls -la /etc' demo.castPlay back the recorded session in your terminal at original speed
asciinema play demo.castPlay back at 2x speed using the playback speed flag
asciinema play -s 2 demo.castRecord with a title and limit idle time to 2 seconds between frames
asciinema rec -t 'Docker Build Demo' -i 2 docker-build.castUpload recording to asciinema.org and receive a shareable HTTPS link
asciinema upload demo.castRecord with a specific terminal size (24 rows × 80 columns)
asciinema rec --rows 24 --cols 80 terminal-session.castRecord a long-running process with max 5-second waits between frames
asciinema rec -w 5 long-process.cast