D2
Modern declarative diagramming language that turns text into diagrams.
Why consider D2?
D2 is a modern declarative diagramming language written in Go. It turns human-readable text into clean software architecture diagrams, UML charts, and interactive documentation.
Learn D2 by building
Practical setup notes, real use cases, and copy-ready examples in one focused guide.
In this guide3 sections
Overview of D2
D2 features expressive syntax, custom themes, Markdown code block embeds, and multiple layout engines (TALA, ELK, Graphviz) for automated layout optimization.
Installing and Running D2
curl -fsSL https://d2lang.com/install.sh | shd2 input.d2 output.svgD2 Syntax Example
server -> database: read/writeclient -> server: HTTPS requestD2 is licensed under the Mozilla Public License Version 2.0 (MPL-2.0).
Related tools
More options with a similar category or technology profile.
diskus
Minimal, fast alternative to du -sh written in Rust using multi-threaded directory traversal.
peco
Simplistic interactive filtering tool for Unix pipelines, process lists, and file trees.
Dapr CLI
Command-line tool for managing Dapr distributed application runtime environments and sidecars.
Freeze
Generate beautiful image screenshots and SVGs of code snippets and terminal outputs.