Record terminal sessions as SVG animations
Clone or download
polyzen and nbedos Ship manuals and tests with package (#77)
Once the package is installed, all tests can be run with
`python -m unittest termtosvg.tests.suite`
Latest commit c68e344 Nov 11, 2018

Build Status CircleCI


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


  • 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


termtosvg is compatible with Linux, Mac OS and BSD OSes, requires Python >= 3.5 and can be installed using pip:

pip3 install --user termtosvg

Basic usage

Start recording with:

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

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:

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

Finally, use your favorite web browser to play the animation:

$ firefox /tmp/termtosvg_exp5nsr4.svg


termtosvg uses:

  • pyte to render the terminal screen
  • lxml to work with SVG data