Command Line
The tegaki package ships a command that writes text as an animated SVG file. It needs no project setup, so it suits READMEs, slides, static sites and scripts (including coding agents) that just want a file.
This writes tegaki-is-awesome.svg in the current directory: the text, self-drawing and repeating forever, in Caveat.
Examples
Section titled “Examples”Options
Section titled “Options”| Option | Default | Description |
|---|---|---|
-o, --output <file> |
<slug>.svg |
Output path; - writes to stdout |
-f, --font <name> |
caveat |
A bundled font; --list-fonts prints them |
-m, --mode <mode> |
loop |
loop (repeats forever), once (draws itself once, then stays complete) or static (finished artwork, no animation) |
--size <px> |
100 |
Font size |
--color <css> |
#1a1a1a |
Stroke color |
--line-height <px> |
font metrics | Line height |
--stagger <advance> |
off | Overlap glyphs instead of drawing them in sequence, e.g. 80% or 0.3 (seconds) |
--speed <x> |
1 |
Playback speed multiplier |
--loop-hold <s> |
1.5 |
In loop mode, seconds the finished text holds before fading |
--letter-spacing <px> |
0 |
Extra space after each character |
--stroke-easing, --glyph-easing |
ease-out-quad, linear |
Easing of each stroke and of each glyph’s time |
--pressure <0-1> |
1 |
Variable stroke width |
--clip <scale> / --no-clip |
1.2 |
Clip strokes to the letter outlines |
--effects <json> |
none | Renderer effects: glow, wobble, taper, strokeGradient, globalGradient |
--seed <n> |
0 |
Seed for wobble and gradient variation |
--no-shaping |
off | One glyph per character, no ligatures, joining or bidi |
Run npx tegaki --help for the full list.
What it does not do
Section titled “What it does not do”- The text must fit the character set of the chosen font. See Getting Started for the bundled fonts.
- It writes SVG only. For PNG, GIF or WebM, use Tegaki Studio; for an app, use the renderer.