2015-03-06 11:59:27 +01:00
|
|
|
# asciinema
|
2013-10-03 17:57:40 +02:00
|
|
|
|
2024-01-10 12:13:50 +01:00
|
|
|
[](https://github.com/asciinema/asciinema/actions/workflows/asciinema.yml)
|
2015-08-07 17:04:55 -04:00
|
|
|
[](https://raw.githubusercontent.com/asciinema/asciinema/master/LICENSE)
|
2013-10-03 17:57:40 +02:00
|
|
|
|
2023-12-20 16:36:18 +01:00
|
|
|
__asciinema__ (aka asciinema CLI or asciinema recorder) is a command-line tool
|
2025-09-11 20:57:29 +02:00
|
|
|
for recording and live streaming terminal sessions.
|
2013-10-03 17:57:40 +02:00
|
|
|
|
2023-12-20 16:36:18 +01:00
|
|
|
Unlike typical _screen_ recording software, which records visual output of a
|
2025-09-11 20:57:29 +02:00
|
|
|
screen into a heavyweight video files (`.mp4`, `.mov`), asciinema CLI runs
|
2023-12-20 16:36:18 +01:00
|
|
|
_inside a terminal_, capturing terminal session output into a lightweight
|
|
|
|
|
recording files in the
|
2025-09-11 20:57:29 +02:00
|
|
|
[asciicast](https://docs.asciinema.org/manual/asciicast/v3/) format (`.cast`),
|
|
|
|
|
or streaming it live to viewers in real-time.
|
2015-03-28 17:56:20 +01:00
|
|
|
|
2023-12-20 16:36:18 +01:00
|
|
|
The recordings can be replayed in a terminal, embedded on a web page with the
|
|
|
|
|
[asciinema player](https://docs.asciinema.org/manual/player/), or published to
|
|
|
|
|
an [asciinema server](https://docs.asciinema.org/manual/server/), such as
|
2025-09-11 20:57:29 +02:00
|
|
|
[asciinema.org](https://asciinema.org), for further sharing. Live streams allow
|
|
|
|
|
viewers to watch terminal sessions as they happen.
|
|
|
|
|
|
|
|
|
|
asciinema runs on GNU/Linux, macOS and FreeBSD.
|
2023-10-03 10:06:20 +02:00
|
|
|
|
2023-12-20 16:36:18 +01:00
|
|
|
[](https://asciinema.org/a/85R4jTtjKVRIYXTcKCNq0vzYH?autoplay=1)
|
2023-10-03 10:06:20 +02:00
|
|
|
|
2023-12-20 16:36:18 +01:00
|
|
|
Notable features:
|
2023-10-03 10:06:20 +02:00
|
|
|
|
2025-09-11 20:57:29 +02:00
|
|
|
- recording and replaying of sessions inside a terminal,
|
|
|
|
|
- local and remote [live
|
|
|
|
|
streaming](https://docs.asciinema.org/manual/cli/quick-start/#stream-a-terminal-session)
|
|
|
|
|
of terminal sessions to multiple viewers in real-time,
|
|
|
|
|
- [lightweight recording
|
|
|
|
|
format](https://docs.asciinema.org/manual/asciicast/v3/), which is highly
|
2023-12-20 16:36:18 +01:00
|
|
|
compressible (down to 15% of the original size e.g. with `zstd` or `gzip`),
|
2025-09-11 20:57:29 +02:00
|
|
|
- integration with [asciinema
|
2023-12-20 16:36:18 +01:00
|
|
|
server](https://docs.asciinema.org/manual/server/), e.g.
|
2025-09-11 20:57:29 +02:00
|
|
|
[asciinema.org](https://asciinema.org), for easy recording hosting and live
|
|
|
|
|
streaming.
|
2017-11-18 22:09:15 +01:00
|
|
|
|
2024-05-07 11:18:53 +02:00
|
|
|
To record a session run this command in your shell:
|
2015-06-23 20:20:22 +02:00
|
|
|
|
2021-10-30 12:45:23 -04:00
|
|
|
```sh
|
2023-12-20 16:36:18 +01:00
|
|
|
asciinema rec demo.cast
|
2017-11-19 18:29:50 +01:00
|
|
|
```
|
2015-03-09 17:05:14 +01:00
|
|
|
|
2024-05-07 11:18:53 +02:00
|
|
|
To stream a session via built-in HTTP server run:
|
|
|
|
|
|
|
|
|
|
```sh
|
2025-09-11 20:57:29 +02:00
|
|
|
asciinema stream -l
|
2024-05-07 11:18:53 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
To stream a session via a relay (asciinema server) run:
|
|
|
|
|
|
|
|
|
|
```sh
|
2025-09-11 20:57:29 +02:00
|
|
|
asciinema stream -r
|
2024-05-07 11:18:53 +02:00
|
|
|
```
|
|
|
|
|
|
2023-12-20 16:36:18 +01:00
|
|
|
Check out the [Getting started
|
|
|
|
|
guide](https://docs.asciinema.org/getting-started/) for installation and usage
|
|
|
|
|
overview.
|
2015-05-24 12:29:58 +02:00
|
|
|
|
2024-01-10 12:09:37 +01:00
|
|
|
## Building
|
|
|
|
|
|
|
|
|
|
Building asciinema from source requires the [Rust](https://www.rust-lang.org/)
|
2025-09-25 18:57:04 +02:00
|
|
|
compiler (1.82 or later), and the [Cargo package
|
2024-01-10 12:09:37 +01:00
|
|
|
manager](https://doc.rust-lang.org/cargo/). If they are not available via your
|
|
|
|
|
system package manager then use [rustup](https://rustup.rs/).
|
|
|
|
|
|
|
|
|
|
To download the source code, build the asciinema binary, and install it in
|
2025-09-11 20:57:29 +02:00
|
|
|
`$HOME/.cargo/bin` in one go run:
|
2024-01-10 12:09:37 +01:00
|
|
|
|
|
|
|
|
```sh
|
2024-05-23 07:09:48 +02:00
|
|
|
cargo install --locked --git https://github.com/asciinema/asciinema
|
2024-01-10 12:09:37 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Then, ensure `$HOME/.cargo/bin` is in your shell's `$PATH`.
|
|
|
|
|
|
|
|
|
|
Alternatively, you can manually download the source code and build the asciinema
|
|
|
|
|
binary with:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
git clone https://github.com/asciinema/asciinema
|
|
|
|
|
cd asciinema
|
|
|
|
|
cargo build --release
|
|
|
|
|
```
|
|
|
|
|
|
2025-09-11 20:57:29 +02:00
|
|
|
This produces the binary at `target/release/asciinema`. You can just copy the
|
|
|
|
|
binary to a directory in your `$PATH`.
|
2024-04-29 22:34:23 +02:00
|
|
|
|
2024-05-15 11:58:17 +02:00
|
|
|
To generate man pages and shell completion files, set `ASCIINEMA_GEN_DIR` to the
|
2024-04-29 22:34:23 +02:00
|
|
|
path where these artifacts should be stored. For example:
|
|
|
|
|
|
|
|
|
|
```sh
|
2024-05-15 11:58:17 +02:00
|
|
|
ASCIINEMA_GEN_DIR=/foo cargo build --release
|
2024-04-29 22:34:23 +02:00
|
|
|
```
|
|
|
|
|
|
2024-05-15 11:58:17 +02:00
|
|
|
The above command will build the binary and place the man pages in `/foo/man/`,
|
|
|
|
|
and the shell completion files in the `/foo/completion/` directory.
|
2024-01-10 12:09:37 +01:00
|
|
|
|
2024-02-12 16:43:02 +01:00
|
|
|
> [!NOTE]
|
2025-09-11 20:57:29 +02:00
|
|
|
> Windows is currently not supported. See [#467](https://github.com/orgs/asciinema/discussions/278).
|
2024-02-12 16:43:02 +01:00
|
|
|
|
2024-01-10 12:09:37 +01:00
|
|
|
## Development
|
|
|
|
|
|
2025-09-11 20:57:29 +02:00
|
|
|
All development happens on `develop` branch. This branch contains the current
|
|
|
|
|
generation (3.x) of the asciinema CLI, written in Rust.
|
|
|
|
|
|
2025-09-11 21:13:21 +02:00
|
|
|
The previous generation (2.x), written in Python, can be found in the `python`
|
2025-09-11 20:57:29 +02:00
|
|
|
branch.
|
|
|
|
|
|
|
|
|
|
If you wish to propose non-trivial code changes, please first reach out to the
|
|
|
|
|
team via [forum](https://discourse.asciinema.org/),
|
2024-01-10 12:09:37 +01:00
|
|
|
[Matrix](https://matrix.to/#/#asciinema:matrix.org) or
|
|
|
|
|
[IRC](https://web.libera.chat/#asciinema).
|
|
|
|
|
|
2023-12-20 16:36:18 +01:00
|
|
|
## Donations
|
2015-05-24 12:29:58 +02:00
|
|
|
|
2023-12-20 16:36:18 +01:00
|
|
|
Sustainability of asciinema development relies on donations and sponsorships.
|
2015-05-24 12:29:58 +02:00
|
|
|
|
2025-09-11 20:57:29 +02:00
|
|
|
If you like the project then consider becoming a
|
2023-12-20 16:36:18 +01:00
|
|
|
[supporter](https://docs.asciinema.org/donations/#individuals) or a [corporate
|
|
|
|
|
sponsor](https://docs.asciinema.org/donations/#corporate-sponsorship).
|
2023-09-19 10:07:32 +02:00
|
|
|
|
|
|
|
|
asciinema is sponsored by:
|
|
|
|
|
|
|
|
|
|
- [Brightbox](https://www.brightbox.com/)
|
2024-06-02 10:59:16 +02:00
|
|
|
- [DataDog](https://datadoghq.com/)
|
2023-09-19 10:07:32 +02:00
|
|
|
|
2023-06-20 10:20:48 +02:00
|
|
|
## Consulting
|
|
|
|
|
|
2023-12-20 16:36:18 +01:00
|
|
|
If you're interested in integration or customization of asciinema to suit your
|
|
|
|
|
needs, check [asciinema consulting
|
|
|
|
|
services](https://docs.asciinema.org/consulting/).
|
2013-10-06 12:58:29 +02:00
|
|
|
|
2014-11-15 17:42:04 +01:00
|
|
|
## License
|
2013-10-06 12:58:29 +02:00
|
|
|
|
2023-02-21 17:49:22 +01:00
|
|
|
© 2011 Marcin Kulik.
|
2014-11-15 17:42:04 +01:00
|
|
|
|
2021-10-30 12:45:23 -04:00
|
|
|
All code is licensed under the GPL, v3 or later. See [LICENSE](./LICENSE) file
|
|
|
|
|
for details.
|