termtosvg is a Unix terminal recorder written in Python that renders your command line sessions as standalone SVG animations.

Features

Produce lightweight and clean looking animations embeddable on a project page

Custom color themes, terminal UI and animation controls via SVG templates

Compatible with asciinema recording format

Install

pip3 install --user termtosvg

Usage

$ termtosvg Recording started, enter "exit" command or Control-D to end

$ exit Recording ended, file is /tmp/termtosvg_exp5nsr4.svg

$ firefox /tmp/termtosvg_exp5nsr4.svg

termtosvg is compatible with Linux, macOS and BSD OSes, requires Python >= 3.5 and can be installed using pip:Simply start recording a terminal session with:You are now in a subshell where you can type your commands as usual. Once you are done, exit the shell to end the recording:Finally, use your favorite web browser to play the animation: