For terminal based things I've been using `asciinema`. There are various options to play/render such recordings, such as to an interactive SVG. SVGs are lot smaller than GIFs in file size, and are even scalable.
See one of my projects for example:
https://github.com/timvisee/ffsend#ffsend-wip