D2
MPL-2.0 diagram-as-code; TALA bundled for auto-layout
DevOps / Diagrams · MPL-2.0 · 25.6k
Reviewed 2026-09-09 · last push 2026-10-11 · repo checked 2026-10-19
What's Good
MPL-2.0. Declarative syntax that reads like YAML-shaped prose. TALA auto-layout engine is bundled for clean positioning. Outputs to SVG, PNG, PDF. Themes and styles. Sequence diagrams, flowcharts, and entity relationships in one grammar. CLI-first, embeddable, and Git-friendly diffs.
The Catch
MPL-2.0 is not MIT — modifications to D2 itself must be disclosed. Vs Mermaid (Markdown-native diagrams) and Excalidraw (hand-drawn freeform): D2 is the text DSL for *structured* diagrams, not a whiteboard and not inline in Markdown by default. TALA-standalone is commercially licensed; pitch D2 with bundled TALA, not TALA alone.
Verdict
MPL-2.0 diagram DSL. Free forever; use when architecture diagrams belong in Git alongside code.
Embed
Maintainer? Add the badge to your README. It is free, links to this review, and there is no paid version.
Markdown
[](https://stackgems.com/gems/d2)
HTML
<a href="https://stackgems.com/gems/d2"><img src="https://stackgems.com/badge/d2.svg" alt="D2 reviewed on Stack Gems" height="20"></a>