Files
asciinema/README.md

142 lines
4.7 KiB
Markdown
Raw Normal View History

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
[![Build Status](https://github.com/asciinema/asciinema/actions/workflows/ci.yml/badge.svg)](https://github.com/asciinema/asciinema/actions/workflows/asciinema.yml)
2015-08-07 17:04:55 -04:00
[![license](http://img.shields.io/badge/license-GNU-blue.svg)](https://raw.githubusercontent.com/asciinema/asciinema/master/LICENSE)
2013-10-03 17:57:40 +02: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
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
_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.
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
[![asciinema CLI
demo](https://asciinema.org/a/85R4jTtjKVRIYXTcKCNq0vzYH.svg)](https://asciinema.org/a/85R4jTtjKVRIYXTcKCNq0vzYH?autoplay=1)
2023-10-03 10:06:20 +02: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
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
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
```sh
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
```
Check out the [Getting started
guide](https://docs.asciinema.org/getting-started/) for installation and usage
overview.
## Building
Building asciinema from source requires the [Rust](https://www.rust-lang.org/)
2025-04-09 16:04:40 +02:00
compiler (1.75 or later), and the [Cargo package
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:
```sh
cargo install --locked --git https://github.com/asciinema/asciinema
```
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.
> [!NOTE]
2025-09-11 20:57:29 +02:00
> Windows is currently not supported. See [#467](https://github.com/orgs/asciinema/discussions/278).
## 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.
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/),
[Matrix](https://matrix.to/#/#asciinema:matrix.org) or
[IRC](https://web.libera.chat/#asciinema).
## Donations
Sustainability of asciinema development relies on donations and sponsorships.
2025-09-11 20:57:29 +02:00
If you like the project then consider becoming a
[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/)
- [DataDog](https://datadoghq.com/)
2023-09-19 10:07:32 +02:00
2023-06-20 10:20:48 +02:00
## Consulting
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
© 2011 Marcin Kulik.
2014-11-15 17:42:04 +01:00
All code is licensed under the GPL, v3 or later. See [LICENSE](./LICENSE) file
for details.