Registry / devops / asciinema

asciinema

JSON →
library2.4.0pypypiunverified

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.

pip install asciinema
INSTALL
IMPORT
SIG · ASCIINEMA
A
asciinema
devopspythonv2.4.0
Install
1.6s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.4.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.1MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 1.6s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

asciinema
asciinema rec my_session.cast
import asciinema; asciinema.record()
Asciinema is primarily a command-line tool. Direct programmatic import and control of recording/playback features as a Python library are not commonly documented or intended for end-users. It's mainly used by executing the `asciinema` command in the shell or via `subprocess` calls in Python.

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
asciinema --version
Debug
Known issues
breakingAsciinema CLI version 3.x (a complete rewrite in Rust, not this Python package) introduces several breaking changes from 2.x, including a new default asciicast v3 format, required filename for `rec`, and renaming of options like `--stdin` to `--capture-input`, and `--env` to `--capture-env`. If you install 3.x from source or other means, be aware of these changes.
fix
For 2.x behavior, explicitly specify `--output-format asciicast-v2` if interacting with older tools, or adjust command-line arguments to the new 3.x equivalents. Stick to `asciinema==2.4.0` from PyPI if 2.x behavior is strictly required.
affects: 3.x (Rust rewrite) vs 2.x (Python)
gotchaThe `asciinema` PyPI package (v2.x) is designed as a standalone command-line application. While it's written in Python, it's not intended for direct `import` and programmatic control of recording/playback features within custom Python scripts. Attempts to import and use internal modules for this purpose may lead to unexpected behavior or API instability.
fix
Use `subprocess` module to call `asciinema` commands if you need to integrate its functionality into a Python application, or consider alternative Python libraries if low-level terminal interaction/recording is required programmatically.
affects: All versions of the Python package (2.x)
deprecatedThe Python-based `asciinema` CLI (version 2.x, including 2.4.0) is now considered the 'previous generation' by the project maintainers. Primary development for the core `asciinema` CLI has shifted to a Rust rewrite (version 3.x). While 2.x is stable and maintained, new major features are likely to land in the Rust version.
fix
Users seeking the absolute latest features or ongoing active development for the CLI might consider the Rust-based version (often installed via `cargo` or package managers for 3.x releases), or continue using 2.x for its stability.
affects: 2.x
gotchaThe default configuration file location changed from `$HOME/.asciinema` to `$HOME/.config/asciinema/config`. If you had custom configurations in the old location, they will not be picked up automatically.
fix
Move your existing configuration file from `$HOME/.asciinema` to `$HOME/.config/asciinema/config`.
affects: < 1.1
gotchaThe term 'API token' used in older versions (prior to 2.0) has been renamed to 'install ID'. This ID is generated locally and used to associate recordings with your asciinema.org account for management.
fix
When performing `asciinema auth` or managing recordings online, be aware that what was previously called an 'API token' is now referred to as an 'install ID'.
affects: < 2.0
Upgrade
Version history
2.4.0latest on PyPI · released Oct 23, 2023
Audit
Dependencies

No dependency data recorded yet.

Agent activity
43 hits · last 30 days
node
36
OpenAI (training)
1
Resources
asciinema — pip install asciinema · libregistry