ttysvg
Reference

Command reference

Every command and flag on ttysvg, record, build, render and theme.

ttysvg

No arguments opens interactive mode. It needs a terminal, so in a script or a pipe use record or build instead.

ttysvg record

Captures a live session. Stops when the program exits. Everything after -- is the command to record.

FlagDefaultMeaning
--outdemo.svgOutput path
--saveoffAlso write the raw capture, for ttysvg render
--redactnoneMask everything matching this regex, repeatable
--sanitizeoffRewrite the home directory, username and hostname
--webp --gif --apng --png --txtoffAlso write raster or text output
--scale --light1, offRaster size multiplier and palette
--cols --rowsyour terminal sizeRecording size in characters
--themetokyonightTheme name, a dark,light pair, or a path to a theme file
--fontsystem monospace stackCSS font family used in the output
--font-size14Pixels
--padding18Pixels of space around the content
--windowoffDraw a title bar
--titleemptyText shown in the title bar
--trim-idle1sCollapse pauses longer than this, or off to keep real timing
--speed1.0Playback multiplier, so 2 is twice as fast
--tail2sHow long the final frame holds before the loop restarts
--no-loopoffPlay once instead of looping
--advanceautoOverride character width in pixels
--line-heightautoOverride line height in pixels

ttysvg build

Runs a tape. Any flag given here overrides the tape.

FlagMeaning
--outOutput path
--saveAlso write the raw capture, for ttysvg render
--redact --sanitizeAdded to whatever the tape already sets
--webp --gif --apng --png --txt --scale --light --also-lightRaster and text output
--themeTheme name or path
--speedPlayback multiplier
--windowForce the title bar on
--titleTitle bar text

ttysvg render

Rebuilds an SVG from a saved capture. Nothing is executed. Anything not given keeps the value the recording was made with.

FlagDefaultMeaning
--outthe capture path with an .svg extensionOutput path
--infooffPrint what the capture holds and exit
--theme --font --font-sizeas recordedSame meaning as on record
--padding --advance --line-heightas recordedSame meaning as on record
--trim-idle --speed --tailas recordedRetime without re-running anything
--window --no-window --titleas recordedTitle bar, either direction
--no-loopas recordedPlay once instead of looping
--redact --sanitizenoneClean a capture that was recorded without them
--webp --gif --apng --png --txt --scale --light --also-lightoffRaster and text output

ttysvg theme

CommandWhat it does
ttysvg theme listEvery theme with its palette drawn in your terminal. ttysvg themes is the same thing
ttysvg theme show <name>One theme in full, both palettes, with the contrast measured
ttysvg theme import <file>Read a base16 scheme or a Windows Terminal settings file and keep the results
ttysvg theme wherePrint the directory imported themes live in

On this page