eraser-diagrams · MIT
AI-native diagramming library
Reliably generated by models, beautifully rendered for humans.
diagram.json
{
"entities": [
{ "tag": "Icon", "id": "client",
"icon": "user",
"x": 190, "y": 40,
"width": 40, "height": 40,
"texts": [{ "text": "Client" }] },
{ "tag": "Group", "id": "vpc",
"color": "blue",
"title": { "text": "Production",
"icon": "server" },
"x": 40, "y": 190,
"width": 420, "height": 190 },
{ "tag": "Icon", "id": "api",
"icon": "node",
"x": 190, "y": 270,
"containerId": "vpc",
"texts": [{ "text": "Orders API" }] },
{ "tag": "Icon", "id": "db",
"icon": "postgres",
"x": 350, "y": 270,
"containerId": "vpc",
"texts": [{ "text": "Postgres" }] }
],
"connections": [
{ "from": "client", "to": "api",
"endArrowhead": "triangle",
"label": "HTTPS",
"fromPort": "bottom",
"toPort": "top" },
{ "from": "api", "to": "db",
"endArrowhead": "triangle",
"label": "reads" }
]
} render
PNGHTML
Designed to be
Generated by models
Compatible with any LLM The JSON schema any text-based LLM can generate
Token-efficient3,238 tok
Fast to generate25.4s
Rarely malformed0.6% retry
A schema designed for AI Token-efficient, fast to generate, rarely malformed
Instructable layout LLM controls the layout at the pixel level, not a layout engine
Built for iteration Make surgical edits and run diffs, instead of regenerating each time
Designed to be
Read by humans
Legible at any size Layout quality holds on complex, real-world diagrams, not just at demo scale.
Best-in-class line routing Orthogonal paths, minimal crossings, clean label placement.
Orders Service Owner · payments-team • handles idempotent retries • p99 120ms
Payments DB Region · us-east-1 • single writer → multi-AZ • retention 35 days
Rich text support Formatted text inside nodes, labels and groups, not just single-line captions.
4,000 icons available AWS, Azure, GCP and vendor logo sets, as an optional add-on.
Designed to be
Run anywhere
Local
CI
Server
Container
Lambda
Runs on your own infrastructure Local, CI, server or Lambda — anywhere you can run a headless browser.
eraser-diagrams render --format
PNGdefault
HTMLself-contained
PNG or interactive HTML One call, either output — the HTML is self-contained, fonts and all.
Easy installation One package install. Point it at a Chromium you already have.
base schema
tag Icon
id orders
text Orders
extended
tier badge critical
oncall true
Orders critical oncall
Customizable schema Extend element types, defaults and styling to match your own domain.
MIT licensed Use it, ship it, embed it in a commercial product.
Gallery
Open source scope
- License
- MIT
- Contributions
- Not open to contribution
- Included
- Data schema · rendering engine · line routing · icon library adapter · exporting
- Not included
- GUI editor · AI prompts · LLM · pre- and post-processing
- Support
- Hosted offering and professional services available. Talk to us →