Menu

skemo documentation

skemo is a language for diagrams. You write cards, the zones that group them and the arrows between them as a few lines of indented text; skemo lays them out, routes the arrows and renders the result as PNG, SVG, WebP, animated HTML or GIF.

{"skemo":1,"name":"intro.skemo","source":"diagram(dir=\"right\")\n card#browser.client Browser\n to(api) HTTPS\n zone#backend Backend\n card#api.service API\n | REST, JSON\n to(db)\n card#db.store Database\n | PostgreSQL\n","css":[{"name":"intro.css","content":".client { --c: #7048E8; --label: \"CLIENT\"; }\n.service { --c: #3E6FC4; --label: \"SERVICE\"; }\n.store { --c: #2F9E44; --label: \"DATA\"; }\n"}],"theme":"light"}CLIENTBrowserBACKENDSERVICEAPIREST, JSONDATADatabasePostgreSQLHTTPS
{"skemo":1,"name":"intro.skemo","source":"diagram(dir=\"right\")\n card#browser.client Browser\n to(api) HTTPS\n zone#backend Backend\n card#api.service API\n | REST, JSON\n to(db)\n card#db.store Database\n | PostgreSQL\n","css":[{"name":"intro.css","content":".client { --c: #7048E8; --label: \"CLIENT\"; }\n.service { --c: #3E6FC4; --label: \"SERVICE\"; }\n.store { --c: #2F9E44; --label: \"DATA\"; }\n"}],"theme":"dark"}CLIENTBrowserBACKENDSERVICEAPIREST, JSONDATADatabasePostgreSQLHTTPS
intro.skemo
diagram(dir="right")
  card#browser.client Browser
    to(api) HTTPS
  zone#backend Backend
    card#api.service API
      | REST, JSON
      to(db)
    card#db.store Database
      | PostgreSQL
intro.css
.client  { --c: #7048E8; --label: "CLIENT"; }
.service { --c: #3E6FC4; --label: "SERVICE"; }
.store   { --c: #2F9E44; --label: "DATA"; }

What you can draw

Where it fits

Why text

  • The text is the source. A diagram is read, reviewed with git diff and fixed like code.
  • Layout is automatic. No coordinates to maintain; pin only what you want fixed.
  • Edits stay local. Changing one card only moves the arrows attached to it.
  • Style is CSS. A card type is one line: an accent colour and a label. Light, dark and print themes follow.
  • Cheap for AI agents. An agent writes a few hundred tokens of text instead of thousands of SVG coordinates.

Learn the language

Getting startedinstall skemo and render a first diagram
Syntaxthe four tags and how a line is read
Cards and zones, arrowsthe elements of a diagram
Styling with CSStypes, colours, looks
Command lineevery command and option

skemo is in pre-release (0.1.0-rc.11). The language described here is stable; features marked preview may still change.