Asciinema

2.4.0 · active · verified Wed Apr 15

Asciinema is a free and open-source command-line tool for recording terminal sessions, sharing them on the web, and replaying them in a terminal or web browser. The PyPI package (version 2.4.0) represents the stable Python-based CLI, which captures terminal output into lightweight text-based `.cast` files. While active development for the core CLI has transitioned to a Rust rewrite (version 3.x, not distributed via PyPI as a Python package), the 2.x Python version remains widely used and maintained.

Common errors

Warnings

Install

Imports

Quickstart

Record a terminal session, save it locally, play it back in the terminal, and then upload it to asciinema.org. The `rec` command starts a new shell where your actions are recorded. To end the recording, type `exit` or press `Ctrl+D`.

asciinema rec demo.cast
# Type some commands, then press Ctrl+D or type 'exit'
echo "Hello from Asciinema!"
pwd
ls -la
exit

asciinema play demo.cast
asciinema upload demo.cast # Will prompt for confirmation to upload to asciinema.org

view raw JSON →