asciinema/avt

asciinema virtual terminal

231

stars

383

commits

Rust

primary language

Aug 14, 2026

updated

asciinema
rust
terminal

README

avt - asciinema virtual terminal

Test Crates.io

avt is asciinema's implementation of virtual terminal emulator written in Rust.

It is used by asciinema CLI, asciinema player, asciinema server and asciinema gif generator.

This implementation covers only parsing and virtual buffer related aspects of a terminal emulator as it's all asciinema needs.

avt consists of:

  • parser for ANSI-compatible video terminal based on excellent state diagram by Paul Williams,
  • virtual screen buffers (primary/alternate) in a form of character grid with additional color/styling attributes,
  • API for feeding text into the parser and for querying virtual screen buffer and cursor position.

Following aspects of terminal emulation are not in scope of this project:

  • input handling,
  • rendering.

While avt is small and focused, a full-fledged terminal emulator could potentially be built on top of it.

avt doesn't try to 100% replicate any specific terminal variant like VT102 or VT520, instead it implements most control sequences supported by modern terminal emulators like xterm, Gnome Terminal, WezTerm, Alacritty, iTerm, Ghostty, mosh etc.

Development

To work on avt, first download the source code:

git clone https://github.com/asciinema/avt
cd avt

The recommended way to get the toolchain is the Nix dev shell, which provides everything needed and just works:

nix develop

If you don't use Nix, you need the Rust toolchain (1.86 or later) with Cargo, installed via your system package manager or rustup.

Then build the library with:

cargo build

To run the test suite:

cargo test

To run the benchmarks:

cargo bench

If you'd like to propose or submit any changes, please read the contribution guidelines first.

Donations

Sustainability of asciinema development relies on donations and sponsorships.

Please help the software project you use and love. Become a supporter or a corporate sponsor.

asciinema is sponsored by:

Consulting

If you're interested in customization of avt or any other asciinema component to suit your corporate needs, check asciinema consulting services.

License

ยฉ 2019 Marcin Kulik.

All code is licensed under the Apache License, Version 2.0. See LICENSE file for details.

Contributors

ku1ik

381 commits

GoldsteinE

1 commits

viktomas

1 commits

asciinema/avt

asciinema virtual terminal

231

stars

383

commits

Rust

primary language

Aug 14, 2026

updated

asciinema
rust
terminal

README

avt - asciinema virtual terminal

Test Crates.io

avt is asciinema's implementation of virtual terminal emulator written in Rust.

It is used by asciinema CLI, asciinema player, asciinema server and asciinema gif generator.

This implementation covers only parsing and virtual buffer related aspects of a terminal emulator as it's all asciinema needs.

avt consists of:

  • parser for ANSI-compatible video terminal based on excellent state diagram by Paul Williams,
  • virtual screen buffers (primary/alternate) in a form of character grid with additional color/styling attributes,
  • API for feeding text into the parser and for querying virtual screen buffer and cursor position.

Following aspects of terminal emulation are not in scope of this project:

  • input handling,
  • rendering.

While avt is small and focused, a full-fledged terminal emulator could potentially be built on top of it.

avt doesn't try to 100% replicate any specific terminal variant like VT102 or VT520, instead it implements most control sequences supported by modern terminal emulators like xterm, Gnome Terminal, WezTerm, Alacritty, iTerm, Ghostty, mosh etc.

Development

To work on avt, first download the source code:

git clone https://github.com/asciinema/avt
cd avt

The recommended way to get the toolchain is the Nix dev shell, which provides everything needed and just works:

nix develop

If you don't use Nix, you need the Rust toolchain (1.86 or later) with Cargo, installed via your system package manager or rustup.

Then build the library with:

cargo build

To run the test suite:

cargo test

To run the benchmarks:

cargo bench

If you'd like to propose or submit any changes, please read the contribution guidelines first.

Donations

Sustainability of asciinema development relies on donations and sponsorships.

Please help the software project you use and love. Become a supporter or a corporate sponsor.

asciinema is sponsored by:

Consulting

If you're interested in customization of avt or any other asciinema component to suit your corporate needs, check asciinema consulting services.

License

ยฉ 2019 Marcin Kulik.

All code is licensed under the Apache License, Version 2.0. See LICENSE file for details.

Contributors

ku1ik

381 commits

GoldsteinE

1 commits

viktomas

1 commits

Languages

Rust

99.4%