Blazingly fast terminal recorder that generates animated gif images for the web written in rust.
NOTE for now t-rec
depends on imagemagick
, but this is going to change soon.
sh
❯ brew install imagemagick
❯ cargo install -f t-rec
NOTE -f
just makes sure the latest version is installed
sh
❯ t-rec
or with specifying a different program to launch
sh
❯ t-rec /bin/sh
You can record not only the terminal but also every other window. There 2 ways to do so:
1) abuse the env var TERM_PROGRAM
like this:
- for example lets record a window 'Google Chrome'
- make sure chrome is running and visible on screen
sh
❯ TERM_PROGRAM="google chrome" t-rec
tmp path: "/var/folders/m8/084p1v0x4770rpwpkrgl5b6h0000gn/T/trec-74728.rUxBx3ohGiQ2"
Press Ctrl+D to end recording
[src/window_id.rs:122] window_owner = "Google Chrome 2"
this is how it looks then:
2) use the env var WINDOWID
like this:
- for example let's record a VSCode
window
- figure out the window id program, and make it
- make sure the window is visible on screen
- set the variable and run t-rec
```sh ❯ t-rec --ls-win | grep -i code Code | 27600
❯ WINDOWID=27600 t-rec
tmp path: "/var/folders/m8/084p1v0x4770rpwpkrgl5b6h0000gn/T/trec-77862.BMYiHNRWqv9Y" Press Ctrl+D to end recording
```
this is how it looks then:
To contribute to t-rec you can either checkout existing issues labeled with good first issue
or open a new issue and describe your problem.
Also every PR is welcome. Support for Linux and Windows needs to be done.