# asciinema

> Command-line tool for recording and live streaming terminal sessions to lightweight asciicast files

Stars: 17.9k · Language: Rust · License: GPL-3.0 · Categories: Dev Tools

- Repository: https://github.com/asciinema/asciinema
- Website: https://asciinema.org
- Page: https://www.trmn.sh/tools/asciinema

## Install

- Cargo: `cargo install --locked --git https://github.com/asciinema/asciinema`

## Overview

asciinema is a terminal session recorder that captures command-line activity into lightweight `.cast` files using the asciicast format. Unlike traditional screen recording software that produces heavyweight video files, asciinema runs inside the terminal and records text-based output that compresses to roughly 8% of the original size.

The tool supports both recording to files and real-time streaming of terminal sessions. Recordings can be replayed directly in a terminal with adjustable playback speed, looping, and step-by-step navigation. Live streaming works through a built-in HTTP server for local viewing or via remote relay servers like asciinema.org for broader sharing. Sessions can be simultaneously recorded and streamed.

Key capabilities include keyboard input capture, environment variable logging, session concatenation, and mid-session controls through customizable key bindings. The tool supports conversion between asciicast versions and export to raw terminal output or plain text. Recordings capture metadata including terminal size, theme, and command details, while headless mode enables scripted usage in CI environments.

Written in Rust, asciinema targets developers, DevOps engineers, and technical educators who need to document terminal workflows, create tutorials, or share debugging sessions. It runs on GNU/Linux, macOS, and FreeBSD, with recordings playable in terminals or embeddable in web pages through the asciinema player.

### Installation

```bash
# via Cargo
cargo install --locked --git https://github.com/asciinema/asciinema
```

![asciinema CLI demo](https://asciinema.org/a/756853.svg)

## Alternatives

- [Hurl](https://www.trmn.sh/tools/hurl.md): Command line tool that runs and tests HTTP requests defined in plain text files, with request chaining, captures, asserts, and CI reports. (Rust, 19.3k stars)
- [tokei](https://www.trmn.sh/tools/tokei.md): Fast code statistics tool that counts lines of code, comments, and blanks across 150+ programming languages (Rust, 15.0k stars)
- [hexyl](https://www.trmn.sh/tools/hexyl.md): Terminal hex viewer that colors bytes by category: NULL, printable ASCII, whitespace, other ASCII, and non-ASCII. (Rust, 10.3k stars)
- [difftastic](https://www.trmn.sh/tools/difftastic.md): Structural diff tool that compares files based on their syntax rather than lines (Rust, 26.1k stars)
- [fnm](https://www.trmn.sh/tools/fnm.md): Fast Node.js version manager built in Rust with support for .node-version and .nvmrc files (Rust, 27.3k stars)

---

Canonical: https://www.trmn.sh/tools/asciinema
