spinagram

CLI

Every command, option and environment variable.

spinagram render specs/ --theme ../my-theme -f svg,png,pptx,figma -o out/
spinagram check specs/ --theme ../my-theme        # text overflow and layout report
spinagram check specs/ --styles --select .critical # why elements look the way they do
spinagram render specs/ --tag kubernetes           # only diagrams tagged kubernetes
spinagram facts specs/                             # facts used, per diagram
spinagram layout spec.yaml -o frozen.yaml          # freeze automatic positions
spinagram serve specs/                             # live-reload UI
spinagram icons search load balancer               # icon pack management
spinagram vectorize icons/ -o vector/              # trace PNG icons into SVG
spinagram deck deck.yaml -o slides.html            # HTML presentation
spinagram skills install --agent claude            # agent skills, see AI agent skills

paths are spec files or directories (*.yaml, *.py). A _defaults.yaml in a directory sets defaults for every spec in it.

OptionCommandsMeaning
-t, --themerender, check, facts, layout, deck, serveTheme directory or built-in name (env SPINAGRAM_THEME)
--only ID...render, check, facts, layoutDiagram ids to include
--tag TAGrender, check, facts, layoutOnly diagrams with this tag, declared or inferred from icons; repeat to require several
--category NAMErender, check, facts, layoutOnly diagrams in this category (case-insensitive)
--layout ENGINErender, check, facts, layout, serveEngine for specs with layout: (flex, dot, elk, d2; env SPINAGRAM_LAYOUT)
-f, --formatsrenderComma list from svg, png, pptx, figma, figjam
-o, --outrender, layout, vectorize, deckOutput directory or file
--no-galleryrenderSkip index.html
--stylescheckExplain each element's computed style: matching rules, overrides, inheritance (details)
--select SELECTORcheckWith --styles or --json: only elements matching a CSS selector
--jsoncheckPrint the style report as JSON
--color auto|always|nevercheckColour the style report (auto: a terminal without NO_COLOR)

Environment variables

VariableEffect
SPINAGRAM_THEMEDefault theme
SPINAGRAM_LAYOUTDefault layout engine override
SPINAGRAM_CACHECache directory for icon packs (default ~/.cache/spinagram)
SPINAGRAM_OFFLINE=1Never download icon packs
SPINAGRAM_ICON_PACKSExtra icon pack registry file
SPINAGRAM_VECTORIZE=0Do not trace PNG icons into SVG
SPINAGRAM_PPTX_SVG=rasterPowerPoint gets PNG icons only

On this page