$linuxjunkies
>

asciinema(1)

Record and share terminal sessions as animated text files.

UbuntuDebianFedoraArch

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

FlagWhat 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, --commandRun a specific command instead of starting an interactive shell
-i, --idle-time-limitLimit idle time between frames (in seconds, default: 2)
-t, --titleSet the title for the recording session
-w, --max-waitMaximum wait time between frames in seconds (speeds up long pauses)
--rowsSet terminal height in rows
--colsSet terminal width in columns
-q, --quietSuppress informational messages during recording
--overwriteOverwrite 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.cast

Record the output of a single command without starting an interactive shell

asciinema rec -c 'ls -la /etc' demo.cast

Play back the recorded session in your terminal at original speed

asciinema play demo.cast

Play back at 2x speed using the playback speed flag

asciinema play -s 2 demo.cast

Record with a title and limit idle time to 2 seconds between frames

asciinema rec -t 'Docker Build Demo' -i 2 docker-build.cast

Upload recording to asciinema.org and receive a shareable HTTPS link

asciinema upload demo.cast

Record with a specific terminal size (24 rows × 80 columns)

asciinema rec --rows 24 --cols 80 terminal-session.cast

Record a long-running process with max 5-second waits between frames

asciinema rec -w 5 long-process.cast