# t-rec: a terminal recorder that makes animated GIFs without a screen recording library

> t-rec is a Rust terminal recorder that captures your shell as an animated GIF, using ImageMagick for the image work and ffmpeg optionally for MP4, and it is distributed through Homebrew, MacPorts, cargo, deb, snap, the AUR and pkgin. The interesting part is that it does not record a video of your screen, it drives your shell, which is why it handles curses programs and escape sequences without trouble.

**sassman/t-rec-rs** — Blazingly fast terminal recorder that generates animated gif images for the web written in rust

- Repository: https://github.com/sassman/t-rec-rs
- Website: https://crates.io/crates/t-rec
- Stars: 1,256 · Forks: 37
- Language: Rust
- License: GPL-3.0
- Published: 2026-10-19 · Updated: 2026-10-19 · Language: en
- Canonical page: https://hysenlabs.com/projects/sassman-t-rec-rs

## What it actually records, and why that makes it robust

t-rec is a blazingly fast terminal recorder that generates animated gif images for the web, written in Rust, and the homepage is the crates.io page for the t-rec crate.

The feature list is written as a list of things that do not go wrong, and that framing is the best description of the design. It has no issues with terminal sizes larger than 80x24, no issues with fonts or colors, no issues with curses based programs, and no issues with escape sequences. It has no record and replay, just one simple command to rule them all. It can record every arbitrary window you want, for example a browser or an IDE.

That list is the design constraint stated plainly. The approach is not to screen-record the terminal and encode the frames, it is to drive the shell and capture what it produces. A curses program that redraws the screen, an application that sets colours and moves the cursor, a terminal that is larger than the classic 80 by 24: none of these are problems, because there is no frame of pixels to capture, there is a stream of terminal output and a terminal state to reproduce.

The other consequences of that approach are in the list too. It runs without any cloud service and entirely offline, and it uses native efficient APIs. Screenshotting your terminal with a configurable framerate, 4 to 15 fps, and it generates high quality small sized animated gif images or mp4 videos. It has built-in idle frames detection and optimization, for super fluid presentations, which is a detail worth understanding: when you sit at a prompt for ten seconds, ten seconds of identical frames is dead weight in the file, and detecting the idle period and collapsing it is what keeps a recording small without making the playback jumpy.

It also applies border decor effects like drop shadow, and those can be disabled.

The project supports Windows, MacOS, Linux and NetBSD, and the topics include screen-recorder, screenshot-generator, terminal-recording and vscode, which tells you the intended use is producing a GIF of a terminal session to put in a README, a bug report or a tutorial.

The primary language is Rust, the licence is GPL-3.0, and the recent releases are v0.9.0-preview4 on 2026-07-08, v0.9.0-preview3 on 2026-06-30 and v0.9.0-preview2 on 2026-05-24, so the project is on a 0.9 preview line. The repository is not archived, with the last push on 2026-10-12.

## The install matrix, and the ImageMagick dependency you cannot avoid

The installation section is long because the project is packaged for a lot of different systems, and one dependency appears in nearly every route.

On macOS there are three. Homebrew with:

```sh
brew install t-rec
```

MacPorts with sudo port selfupdate and sudo port install t-rec, or cargo, and the cargo route has a note that t-rec depends on imagemagick, so you install it with brew install imagemagick and then cargo install -f t-rec. The note on the -f flag says it just makes sure the latest version is installed.

On Linux the same dependency appears. cargo requires sudo apt-get install libx11-dev imagemagick and then cargo install -f t-rec. The libx11-dev is the X11 development headers, which tells you the Linux path captures through X11 rather than through a terminal multiplexer.

Then the .deb route, which pins an older version: sudo apt-get install imagemagick, wget the t-rec_0.5.0_amd64.deb from the v0.5.0 release, and sudo dpkg -i it. The .deb still points at 0.5.0 while the crate is at a 0.9 preview, so the deb packages lag the crate line.

The snap has a note that matters. The TL;DR is sudo snap install t-rec --classic and then /snap/bin/t-rec --version, which shows t-rec 0.4.3. The --classic flag is required because a strict snap cannot read the terminal, and the version shown is 0.4.3, so the snap is well behind the crate. The snap has per-distro install instructions for Linux Mint and Arch.

The AUR route uses an AUR helper, paru -S t-rec, or the packages can be cloned and built with makepkg, with git clone, cd into the directory and makepkg -si.

NetBSD has pkgin install t-rec, or a source build from the pkgsrc tree with cd /usr/pkgsrc/multimedia/t-rec and make install.

So the packaging story is broad but uneven. The current version is what cargo gives you, the deb is at 0.5.0, the snap is at 0.4.3, and only the AUR and pkgsrc are likely current. And every route except the pre-built binaries needs ImageMagick, because that is what turns the captured frames into a GIF.

That last point is a real constraint in a container or a minimal CI image, and it is why the Windows section spells out the requirement so clearly: t-rec requires ImageMagick for GIF generation and decor effects, and optionally ffmpeg for MP4 video, installed with winget install ImageMagick.ImageMagick and winget install ffmpeg, and both binaries need to be on your PATH afterwards, which means restarting your terminal.

The repository layout backs the packaging story up. There is a .brew/ directory for the Homebrew formula, a .deb/ directory, a snap/ directory, a crates/ directory holding the t-rec crate, a dist-workspace.toml, a Cargo.lock and a Cargo.toml.

## The options, and what the preview and video flags actually do

The full options list in the README is the most complete documentation of the tool's behaviour, and a few of the flags are worth explaining.

The positional argument is [PROGRAM], a shell or program to launch, defaulting to $SHELL. So t-rec with no arguments records your login shell, and t-rec /bin/sh records a specific one.

The video flags are separate from the GIF. -m, --video generates additionally to the gif a mp4 video of the recording, and -M, --video-only generates only a mp4 video and not gif. So the default output is a GIF, the video is opt in, and the two can be produced together or the video alone.

The decor and background options control the frame around the terminal. -d, --decor decorates the animation with certain, mostly border effects, with possible values shadow and none, and the default is none. -b, --bg sets the background color when decors are used, with possible values white, black and transparent, and the default is transparent. Transparent is the right default for a README, since a GIF with a transparent background sits on whatever page background it lands on.

The wallpaper options are a newer addition and are the most elaborate. -p, --wallpaper sets a wallpaper background, where ventura is the built-in option, or you can provide a path to a custom image in PNG, JPEG or TGA. And --wallpaper-padding sets the padding in pixels around the recording when using --wallpaper, defaulting to 60. The built-in name ventura points at the macOS wallpaper style, so the feature is aimed at making a recording look like a native terminal screenshot.

The output control is minimal. There is no output path option in the visible portion of the list, which means the filename and location are decided by the tool rather than by the user, and there is no frame rate flag visible either, even though the feature list says the framerate is configurable at 4 to 15 fps, so that option exists further down the list than the excerpt shown.

The quiet flag is a small thing that matters in a script. -q, --quiet suppresses the banner, which is the text Press Ctrl+D to end recording, and that banner would otherwise end up in the recorded output of every automated invocation. The verbose flag, -v, --verbose, enables verbose insights for the curious, which is a phrase that says the tool will tell you what it is doing when you ask.

The README also documents the distros the tool was tested on, with demo GIFs for each: ubuntu 20.10 on GNOME, ubuntu 20.10 on i3wm, linux mint 20 on cinnamon, and ArcoLinux 5.4 on Xfwm4. Four desktop environments, which is the interesting test matrix for a terminal recorder, since a window manager like i3 or Xfwm4 has no window decorations and behaves quite differently from GNOME or Cinnamon.

## Windows, the ConPTY requirement, and the Rust side of the project

Windows is the newest and least settled part of the project, and the README marks it as a preview in a prominent warning near the top.

Windows support is in preview, and the first Windows-capable release is shipped as a pre-release, v0.9.0-preview1, so it does not auto-install via cargo install t-rec or the distro packages, and you have to opt in. The instruction is to try it and report what you find on the issue tracker.

The consequence for installation is that cargo and the distro package managers do not pick up pre-releases by default, so the command pins the version explicitly: cargo install -f t-rec --version 0.9.0-preview1. There is also a pre-built binary route, a Windows zip attached to the v0.9.0-preview1 release that you unpack and drop t-rec.exe somewhere on your PATH.

The technical constraint is specific. t-rec uses ConPTY, the Windows pseudo-console, through CreatePseudoConsole, which is available from Windows 10 v1809, build 17763, onwards. Earlier Windows versions are not supported. That is the same design idea as on Unix, driving a pseudo-terminal rather than reading pixels, and it is why the Windows support needed the newest available mechanism.

The shell handling is also specified. By default t-rec spawns cmd.exe, and to record a different shell you pass it as an argument or set the environment variable. So t-rec powershell.exe, t-rec pwsh.exe, or setting the variable and running t-rec with no argument all work.

On the Rust side, the manifest is informative about the macOS implementation. The workspace has a single member, crates/t-rec, with the version 0.9.0-preview4, the edition 2018 and the licence GPL-3.0-only. The author is Sven Kanoldt.

The dependency list is where the platform story is told. There are the modern objc2 crates, objc2, objc2-foundation and objc2-app-kit, which are the modern bindings to the macOS Objective-C runtime, and they are marked as preferred. Then objc2-core-graphics with a feature list that includes CGColor, CGColorSpace, CGPath, CGContext, CGAffineTransform, CGWindow, CGDirectDisplay, CGImage, CGDataProvider and CGBitmapContext, which is the set of Core Graphics calls you need to read a window's contents and draw it. And objc2-core-foundation with CFRunLoop, CFDate, CFArray, CFDictionary, CFString, CFNumber, CFAttributedString and CFBase, which is what you need to run a run loop and handle the text rendering.

Two of those are commented out, objc2-quartz-core and objc2-core-text, and the commented out feature lists inside core-graphics and core-foundation include items such as CGPath and CTFont. So the project is selectively enabling the Objective-C surface it needs, which is a reasonable way to keep the build small and the dependency tree shallow.

The dist profile is also specified, inherits release with lto set to thin, which is the setting cargo-dist uses when it builds the release binaries, and the shared dependencies are anyhow for error handling and log for logging.

## Conclusion

t-rec fits a developer or technical writer who wants to turn a terminal session into a GIF for a README or a bug report, and who can install ImageMagick. It is the wrong choice if you need a video of a graphical application, since it records a shell rather than a screen, and the wrong choice if you cannot install ImageMagick on the machine. Before adopting, install ImageMagick since the GIF generation depends on it, and note that Windows support is still a pre-release, so the cargo install and distro packages do not pick it up by default.

## FAQ

### What does t-rec record and what does it output?

It records your terminal session by driving the shell rather than screen-capturing, and outputs an animated GIF by default, with a configurable framerate of 4 to 15 fps. It can also produce an MP4 with --video, or only an MP4 with --video-only, and it has built-in idle frame detection so time spent sitting at a prompt does not bloat the file.

### What does t-rec need installed besides itself?

ImageMagick is required for GIF generation and the decor effects, and ffmpeg is optional for MP4 video. On Linux the cargo route also needs libx11-dev. On Windows you install them with winget install ImageMagick.ImageMagick and winget install ffmpeg, and both binaries have to be on your PATH afterwards.

### How do I install t-rec on macOS and Linux?

On macOS, brew install t-rec, or MacPorts with sudo port install t-rec, or cargo install -f t-rec after installing ImageMagick. On Linux, cargo install -f t-rec after installing libx11-dev and imagemagick, or a .deb package, or the snap with sudo snap install t-rec --classic, or the AUR with an AUR helper.

### Is Windows support for t-rec stable?

No, it is in preview. The first Windows-capable release shipped as the v0.9.0-preview1 pre-release, which cargo and the distro package managers do not pick up by default, so the install command pins the version explicitly. It requires ConPTY, available from Windows 10 v1809 build 17763 onwards, and it spawns cmd.exe by default.

## Sources

- [License: GPL-3.0](https://github.com/sassman/t-rec-rs/blob/main/LICENSE)
- [Project website](https://crates.io/crates/t-rec)
- [README](https://github.com/sassman/t-rec-rs/blob/main/README.md)
- [Releases](https://github.com/sassman/t-rec-rs/releases)
- [sassman/t-rec-rs on GitHub](https://github.com/sassman/t-rec-rs)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/sassman-t-rec-rs
