Asciicast Output
Author: rsteubeCreated Oct 30, 2022Updated Sep 14, 2026
This is probably out of scope but would be nice to have asciicast output (Output: out.cast).
I initally wanted gif for the readme and asciicast for the mdbook documentation but then decided against gif due to it's size.
Managed to record it by simply spawning an asciinema recording within tmux.
Keeping size in sync with the other outputs could be challenge but there are also gif, svg,.. generators available for asciicast.
It might even provide an alternative to the chrome dependency (which pushes my cpu to the limit).
- width/height with tmux
- hide/show support with pause/resume
Hide
Type "tmux"
Enter
Type "tmux resize-window -x 108 -y 24"
Enter
Type "asciinema rec --overwrite out.cast"
Enter
Sleep 1s
Show
# ...
Hide
Type "exit"
Enter
ShowExample
Asciicast
Gif
GIF output with agg (ignore the missing symbols, didn't get the font right)
agg --font-family "RobotoMono Nerd Font Mono,Noto Color Emoji" carapace-bin.cast out.gif
Svg
SVG output with svg-term-cli (nice output but high load for playing it)
cat carapace-bin.cast | svg-term --out out.svgrelated #105
Source: charmbracelet/vhs