termtosvg (GitHub repo) is a handy little tool that makes recording animated sessions in the terminal as simple as humanly possible. Instead of generating heavy graphics or video animations, this tool creates SVG files, which are a lot smaller and easier. There is also a selection of themes to choose from.
Th resulting SVG files can be used as quick demos and guides in READMEs on GitHub, or as tutorials for your application’s website.