How to make an animated GIF of your terminal commands
1 min readOct 6, 2017
Sometimes a dump of text in a code block just isn’t enough. Here’s how to record your terminal session turn it into an animated GIF.
Install the following:
- https://github.com/mjording/ttyrec
- https://github.com/icholy/ttygif
- https://github.com/pornel/giflossy
Record, GIFerize, and Optimize your terminal:
$ ttyrec bacon
# do some stuff
ctrl-D
$ ttygif bacon
$ gifsicle -O3 -k 8 --lossy=80 -o tty-small.gif tty.gif
$ ls -alh tty*.gif
-rw-rw-r-- 1 bob bob 386K Oct 6 16:10 tty.gif
-rw-rw-r-- 1 bob bob 186K Oct 6 16:12 tty-small.gif