ttysvg
Reference

Tape directives

Every settings directive and every action a tape can run.

Lines starting with # are comments. Durations accept ms, s and m, and a bare number means milliseconds. Backslashes inside quotes are literal, so Windows paths like type ".\scripts\build.ps1" work as written.

Settings

Valid anywhere in the file.

DirectiveExample
outputoutput "docs/demo.svg"
themetheme "catppuccin"
width heightwidth 90
fontfont "JetBrains Mono" 14
font-size paddingpadding 20
advance line-heightadvance 8.4
shellshell "bash" "-i"
window title loopwindow on
trim-idle tail speedtrim-idle 500ms
type-delaytype-delay 40ms
redactredact "sk-[A-Za-z0-9]+"
sanitizesanitize on

Actions

Run in order.

DirectiveExample
typetype "cargo build"
waitwait "Finished" 30s
sleepsleep 1.5s
enter tab backspace escape spaceenter
up down left rightdown 3
ctrlctrl c

Key directives take an optional repeat count, so down 3 presses it three times.

The two timing levers

speed and trim-idle do different things and are worth setting independently.

speed 3.0        # plays the whole recording three times faster
trim-idle 400ms  # caps every individual gap

speed compresses everything uniformly. trim-idle only touches dead air, so a linker that stalls for twenty seconds becomes a short pause rather than a frozen picture, while the parts where something is happening keep their real rhythm.

tail is separate again: it is how long the final frame holds before the loop restarts, which is what gives the reader time to register the result.

On this page