# D2

> MPL-2.0 diagram-as-code; TALA bundled for auto-layout

**Category:** DevOps  
**Pricing:** open-source  
**URL:** https://d2lang.com  
**GitHub:** https://github.com/d2lang/d2  
**Added:** 2026-09-09

---

## The Hook

D2 is text-to-diagram when you want version-controlled architecture drawings, not drag-and-drop Excalidraw.

## 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.
