7 Best Terminal Session Recording Tools for Demos and Docs
Key takeaways
- asciinema records sessions as lightweight text files that replay in a browser player, with copyable text.
- agg and svg-term-cli turn asciinema recordings into GIFs or animated SVGs for READMEs.
- VHS from Charm scripts a recording from a tape file, so demos can be regenerated in CI.
- Terminalizer and t-rec produce GIFs directly, one from an editable YAML recording, the other by capturing the window.
- util-linux script and scriptreplay are already installed on most Linux systems and suit plain logging.
What terminal recording is for
Recording a terminal session sounds simple, but people want it for very different jobs. Documentation writers need a short, clean demo for a README. Developer advocates need repeatable videos that stay in sync with a CLI as it changes. Support engineers want a faithful log of what happened during an incident. Teachers want students to pause a recording and copy a command.
These needs pull in different directions. Screen video is heavy and blurry when scaled. Text-based recordings are tiny and copyable, but need a player or a conversion step. Scripted recordings are reproducible but take setup. The tools below cover each approach, and many teams combine two: one to record, another to render a GIF or SVG for places that cannot embed a player.
Quick comparison
| Tool | Best for | Starting price | Free plan |
|---|---|---|---|
| asciinema | Text-based recordings with a web player | Free (open source) | Yes (open source) |
| agg | Converting asciinema casts to GIF | Free (open source) | Yes (open source) |
| VHS | Scripted, reproducible demo recordings | Free (open source) | Yes (open source) |
| Terminalizer | Editable recordings rendered to GIF | Free (open source) | Yes (open source) |
| t-rec | Quick GIFs captured from the terminal window | Free (open source) | Yes (open source) |
| script and scriptreplay | Plain session logs on Linux | Free (open source) | Yes (open source) |
| svg-term-cli | Animated SVGs from asciinema casts | Free (open source) | Yes (open source) |
The best terminal session recording tools
1. asciinema
- Official site: https://asciinema.org/
- Best for: Text-based recordings with a web player
- Starting price: Free (open source)
- Free plan: Yes (open source)
- Pros: Tiny recordings with selectable, copyable text; Embeddable player and self-hostable server
- Cons: Not a video file, so some platforms cannot embed it; Needs a converter for GIF output
asciinema records a terminal session as a stream of output and timing data in its asciicast format, rather than capturing pixels. The result is a small text file that replays crisply at any size in the asciinema web player, and viewers can pause and copy text straight out of the recording.
Recordings can be kept local, uploaded to asciinema.org, or published to a self-hosted asciinema server. The player can be embedded in docs sites. Because the format is open, other tools in this list read it. The limit is reach: places like some chat apps or README renderers that only accept images need a conversion step.
2. agg
- Official site: https://docs.asciinema.org/manual/agg/
- Best for: Converting asciinema casts to GIF
- Starting price: Free (open source)
- Free plan: Yes (open source)
- Pros: Official asciinema project; Options for themes, fonts and playback speed
- Cons: Only converts, does not record; GIF files grow with long recordings
agg is the asciinema GIF generator, a command-line tool from the asciinema project that reads an asciicast file and writes an animated GIF. It lets you pick a color theme, font family and size, speed multiplier and idle time limit, which helps trim long pauses.
It is the simplest way to put an asciinema recording into a GitHub README or an issue comment where a player cannot run. The usual trade-off of GIFs applies: text is no longer selectable, and long sessions produce large files, so keep demos short.
3. VHS
- Official site: https://github.com/charmbracelet/vhs
- Best for: Scripted, reproducible demo recordings
- Starting price: Free (open source)
- Free plan: Yes (open source)
- Pros: Recordings defined in version-controlled tape files; Outputs GIF, MP4 and WebM
- Cons: Requires ttyd and ffmpeg; Scripted demos take time to tune
VHS, from Charm, takes a different approach: instead of recording you typing, you write a tape file with commands like Type, Enter, Sleep and Set for font size or theme, and VHS plays it in a headless terminal and renders the result.
Because the tape lives in the repository, the demo can be regenerated whenever the CLI changes, including in CI. That makes it attractive for open source tools with frequent releases. The downside is that it depends on ttyd and ffmpeg, and polishing timing in a script can take several iterations.
4. Terminalizer
- Official site: https://www.terminalizer.com/
- Best for: Editable recordings rendered to GIF
- Starting price: Free (open source)
- Free plan: Yes (open source)
- Pros: Recording saved as editable YAML; Configurable window frame and styling
- Cons: Node.js toolchain required; Rendering long recordings can be slow
Terminalizer is a Node.js tool that records a session into a YAML file containing each frame's content and delay. You can edit that file to fix a typo or shorten a pause, then render it to an animated GIF with a styled window frame, or play it back in the terminal.
The config controls fonts, colors, frame style and quality, so output can match a brand style. Recordings can also be shared through the project's web player. It needs Node.js installed, and very long sessions take a while to render, so it works best for short, polished clips.
5. t-rec
- Official site: https://github.com/sassman/t-rec-rs
- Best for: Quick GIFs captured from the terminal window
- Starting price: Free (open source)
- Free plan: Yes (open source)
- Pros: Records straight to GIF with no conversion step; Can also produce MP4
- Cons: Captures pixels, so text is not selectable; Desktop only, not for headless servers
t-rec is a Rust tool that records the terminal window itself by taking screenshots, then assembles them into a GIF, with an option to generate an MP4 as well. It runs on macOS and Linux and can record a specific window by its ID.
Because it captures exactly what the window shows, fonts, themes and graphical tricks appear as they do on screen, with no format conversion. That also means it needs a desktop session and produces image output only. It suits quick visual clips more than documentation that readers will copy from.
6. script and scriptreplay
- Official site: https://man7.org/linux/man-pages/man1/script.1.html
- Best for: Plain session logs on Linux
- Starting price: Free (open source)
- Free plan: Yes (open source)
- Pros: Already installed on most Linux systems; Timing file enables faithful replay
- Cons: Raw logs include control characters; No GIF or web player
The script command from util-linux starts a shell and writes everything printed to the terminal into a file, often called a typescript. With a timing log enabled, the companion scriptreplay command plays the session back at its original pace in the terminal.
It is useful for keeping a record of maintenance work on a server, sharing exact output with a colleague, or training material that never leaves the terminal. The raw file contains escape sequences, so it reads poorly in a text editor, and there is no built-in way to publish it on the web.
7. svg-term-cli
- Official site: https://github.com/marionebl/svg-term-cli
- Best for: Animated SVGs from asciinema casts
- Starting price: Free (open source)
- Free plan: Yes (open source)
- Pros: SVG output stays sharp at any size; Small files compared with GIFs
- Cons: Depends on asciinema recordings; Very long casts create heavy SVGs
svg-term-cli converts an asciicast file, either local or fetched by ID from asciinema.org, into an animated SVG. Options cover the window frame, dimensions, padding and which frames to include, so you can trim a recording to its key moments.
SVG keeps text vector-sharp on high-resolution screens and is usually smaller than an equivalent GIF, which makes it a good README option. It is a Node.js package, and some platforms that sanitize SVG may not animate it, so test where it will be shown.
How they differ
There are three recording models. Text-stream recorders (asciinema, script) capture output and timing, keeping files small and faithful. Scripted generators (VHS) describe the session in a file and render it on demand. Pixel or frame recorders (t-rec, Terminalizer) produce visual output directly. Converters (agg, svg-term-cli) sit downstream of asciinema and turn its casts into GIF or SVG for places that cannot run a player.
How to choose
For docs and tutorials where readers copy commands, record with asciinema and embed the player. For a README image, convert that cast with agg for GIF or svg-term-cli for SVG. For demos that must stay current with your CLI, write a VHS tape and regenerate it in CI. For a quick clip of exactly what your screen shows, use t-rec, or Terminalizer if you want to edit frames first. For audit-style logs on a server, use script and scriptreplay.
How we chose
We reviewed vendor docs, official project pages and public documentation for each tool, including the util-linux man pages, comparing recording model, output formats and dependencies. We did not run our own recordings for this comparison and describe only features documented by each project.
FAQ
Can I copy text from a terminal recording?
Yes, from asciinema recordings played in its web player. GIFs and MP4s from other tools are images, so text cannot be selected.
How do I put a terminal demo in a GitHub README?
Convert an asciinema cast with agg or svg-term-cli, or render a GIF with VHS, then commit the image and reference it in Markdown.
Do recordings capture passwords I type?
Hidden password prompts are not echoed to the terminal, so text recorders do not see them, but anything visible on screen is recorded. Review files before sharing.
Which tool works on a headless server?
asciinema and script both work over SSH without a desktop. VHS runs headless too, given ttyd and ffmpeg.
Sources
- https://asciinema.org/
- https://docs.asciinema.org/manual/agg/
- https://github.com/asciinema/agg
- https://github.com/charmbracelet/vhs
- https://www.terminalizer.com/
- https://github.com/faressoft/terminalizer
- https://github.com/sassman/t-rec-rs
- https://man7.org/linux/man-pages/man1/script.1.html
- https://man7.org/linux/man-pages/man1/scriptreplay.1.html
- https://github.com/marionebl/svg-term-cli