Quick intro
asciinema lets you easily record terminal sessions and replay
them in a terminal as well as in a web browser.
Install latest version (other installation options)
using pipx (if you have it):
pipx install asciinema
If you don't have pipx, install using pip with your preferred Python version:
python3 -m pip install asciinema
Record your first session:
asciinema rec first.cast
Now replay it with double speed:
asciinema play -s 2 first.cast
Or with normal speed but with idle time limited to 2 seconds:
asciinema play -i 2 first.cast
You can pass -i 2
to asciinema rec
as well, to set it permanently on a
recording. Idle time limiting makes the recordings much more interesting to
watch. Try it.
If you want to watch and share it on the web, upload it:
asciinema upload first.cast
The above uploads it to asciinema.org, which is a
default asciinema-server
instance, and prints a secret link you can use to watch your recording in a web
browser.
You can record and upload in one step by omitting the filename:
asciinema rec
You'll be asked to confirm the upload when the recording is done. Nothing is
sent anywhere without your consent.
These are the basics, but there's much more you can do. The following sections
cover installation, usage and hosting of the recordings in more detail. Also,
checkout agg if you're interested in GIF generation.
Installation
Python package from PyPI
asciinema is available on PyPI and can be installed with
pipx (if you have it) or with pip (Python 3
with setuptools required):
pipx install asciinema
Or with pip (using your preferred Python version):
python3 -m pip install asciinema
Installing from PyPI is the recommended way of installation, which gives you the latest released version.