Gridgram
A Mermaid-like text grammar for AI-era relationship diagrams.
Simple DSL
A small grammar that humans and LLMs both write fluently.
TypeScript library
Drop it into web apps, build scripts, servers — anywhere JS runs.
5,500+ icons
Tabler icons built in — search and use any of them instantly. tabler.io/icons ↗
SVG or PNG output
Ship to the web, docs, slides, or print — one renderer, either format.
Place icons on a grid
The primary workflow — put nodes at explicit coordinates (@A1, @B1, …) and connect them. Same diagram, two authoring styles.
Built for LLM agents out of the box
Four first-class integration channels — pick whichever host you already use. Every path speaks the same `.gg` grammar, so your diagrams stay portable between agents.
Claude Code plugin
Marketplace plugin with /gg-install, /gg-icons, /gg-author, /gg-render slash commands.
Tutorial →gh skill
Install the same skill bundle into Copilot, Cursor, Gemini CLI, or Codex with one `gh` command.
Tutorial →context7 (MCP)
Zero-install doc retrieval — any MCP-capable agent can query gridgram's full reference.
Tutorial →llms.txt
Public discovery files at the site root. curl-able index and ~230 KB full-bundle for context windows.
Reference →
How it works
Two authoring paths converge on one rendering pipeline. The gg CLI reads .gg files; the gridgram npm package takes a DiagramDef directly. Both emit the same SVG. PNG is produced by the CLI only, via sharp / libvips fetched on first use.
Ready to try it?
No signup, no API key — everything runs locally.
Built on open source
Gridgram stands on the shoulders of these projects. Licenses and notices are reproduced in THIRD_PARTY_LICENSES.md and gg --license.
- Preact ↗MIT
Virtual-DOM core and SSR renderer
- preact-render-to-string ↗MIT
SVG string output
- JSON5 ↗MIT
`doc { … }` block parsing
- Tabler Icons ↗MIT
5,500+ built-in outline and filled icons
- sharp ↗Apache-2.0
PNG rasterization (CLI only, fetched at runtime)
- libvips ↗LGPL-2.1-or-later
sharp's image-processing backend (CLI only, fetched at runtime)
- Bun ↗MIT
Build toolchain and CLI compile target
- VitePress ↗MIT
This documentation site