d2lang/d2
D2 is a modern diagram scripting language that turns text to diagrams.
From the publisher
README & documentation
Source previewRead the project’s overview, installation instructions and usage examples. The original README is the source of truth.
Docs | Cheat sheet | Comparisons | Playground [](https://github.com/d2lang/d2/actions/workflows/ci.yml) [](https://github.com/d2lang/d2/actions/workflows/weekly-race.yml) [](https://github.com/d2lang/d2/releases) [](./CHANGELOG.md) [](https://www.npmjs.com/package/@d2lang/d2) [](https://discord.gg/NF6X8K4eDq) [](./LICENSE.txt) https://user-images.githubusercontent.com/3120367/206125010-bd1fea8e-248a-43e7-8f85-0bbfca0c6e2a.mp4 The most convenient way to use D2 is to just run it as a CLI executable to produce SVGs from .d2 files. A browser window will open with out.svg and live-reload on changes to in.d2. The easiest way to install is with our install script: You can run the install script with --dry-run to see the commands that will be used to install without executing them. Or if you have Go installed you can install from source though you won't get the manpage: You can also install a release from source which will include manpages. See ./docs/INSTALL.md#source-release. To uninstall with the install script: For detailed installation docs, see ./docs/INSTALL.md. We demonstrate alternative methods and examples for each OS. As well, the functioning of the install script is described in detail to alleviate any concern…
Read the full README ↗ · Preview checked 2026-10-27T04:23:21.779Z
Inside the original README — Document outline
- Table of Contents
- What does D2 look like?
- Quickstart
- Install
- D2 as a library
- Themes
- Fonts
- Export file types
- Language tooling
- Layout engines
- Comparison
- Contributing
Headings are captured from the source. Links open the publisher’s document, not a locally hosted copy.
Links from the README
References supplied by the publisher, not independently verified endorsements. Check the destination before downloading files or entering credentials.
Documentation belongs to its respective authors. Reported project/model license: MPL-2.0. A listing is not a grant of reuse or training rights. Confirm the document’s own terms at the source.
What this repository does
D2 is a modern diagram scripting language that turns text to diagrams.
Repository facts
- Owner
- d2lang
- Primary language
- Go
- Stars
- 25,773
- Forks
- 777
- Open issues + pull requests
- 543
- License
- MPL-2.0
- Archived
- No
- Default branch
- master
- Created
- 2022-09-05T23:12:27.000Z
- Last push
- 2026-10-11T23:37:43.000Z
Topics and intended use
Owner-supplied topics: developer-tools, diagramming, diagrams, go, golang, software-architecture, text-to-diagram
Review the README for scope, installation, examples and limitations. We do not run repository code or certify it.
Evaluate before installing
Review licensing and dependencies, inspect recent commits and unresolved issues, and test in an isolated environment before production use. Stars and forks alone cannot answer these questions.
Source and freshness
Source: GitHub. Metadata observed 2026-11-01T12:19:46.836Z. Daily imports are snapshots, not real-time monitoring.
Popularity and source listings do not establish security, suitability, licensing rights or benchmark performance.