D2 Modern Diagram Scripting Language and CLI
D2 is a modern diagram scripting language that turns text into diagrams. It compiles declarative text files into SVG, PNG, and PDF outputs with automatic layout, multiple themes, and support for sequence diagrams, class diagrams, and network topologies.
What it does
D2 Modern Diagram Scripting Language and CLI
D2 is a modern diagram scripting language that turns text into diagrams. It compiles declarative text files into SVG, PNG, and PDF outputs with automatic layout, multiple themes, and support for sequence diagrams, class diagrams, and network topologies.
Installation
Use the upstream install or setup path that matches your environment:
- go install oss.terrastruct.com/d2@latest
Requirements and caveats from upstream:
- particularly suited for node-link diagrams with an inherent direction and ports.
- specifically for software architecture diagrams. Requires separate install, visit the
- Python D2 diagram builder: https://github.com/MrBlenny/py-d2
Basic usage or getting-started notes:
- <img width="400px" src="./docs/assets/example.svg" alt="D2 render example" />
-
The most convenient way to use D2 is to just run it as a CLI executable to
-
produce SVGs from .d2 files.
-
Extracted from upstream docs: https://raw.githubusercontent.com/terrastruct/d2/HEAD/README.md
Source
Capabilities
Install
Quality
deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 8 github stars · SKILL.md body (1,227 chars)