ttysvg

Introduction

Record your terminal and get one animated SVG you can drop straight into a README.

ttysvg records a terminal session into a single animated SVG. No JavaScript, no video, no external requests. The text in it is real text, so it stays sharp at any zoom and you can select and copy it, and one file carries a light palette and a dark palette at once so it matches whichever theme the reader is using.

It works on Windows, which is the reason this project exists.

What you get

  • One file. A .svg you commit next to your code. GitHub renders it inline.
  • Small. A typical recording is 20 to 100 KB. The same thing as a GIF is several megabytes.
  • Sharp forever. Vector text, not pixels. Zoom in as far as you like.
  • Theme aware. One file looks correct on both the light and dark versions of a page.
  • Repeatable. Write your demo as a short script and regenerate it whenever your output changes.
  • Nothing to learn first. Run ttysvg with no arguments and answer five questions.

Why this exists

A command line tool is judged by the demo at the top of its README. If you develop on Windows, there was no good way to make one.

ToolWhy it does not work on Windows
asciinemaUnix only. There is no Windows recorder, because it depends on a Unix pty.
VHSRequires ttyd and ffmpeg. The Windows path is unofficial and breaks easily.
svg-term-cliUnmaintained, and it needs an asciinema recording as its input.
Screen capture to GIFMulti megabyte, blurry when scaled, wrong colors in dark mode, and a single typo means recording the whole thing again.

ttysvg talks to the Windows pseudo console (ConPTY) directly. The same code runs on macOS and Linux through a normal pty, so a project can use one tool everywhere.

Where to go next

On this page