d2lang/d2

D2 is a modern diagram scripting language that turns text to diagrams.

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 51 minutes ago
Added to GitGenius on September 2nd, 2026
Created on September 5th, 2022
Open Issues & Pull Requests: 520 (+0)
GitHub issues: Enabled
Number of forks: 734
Total Stargazers: 25,176 (+0)
Total Subscribers: 79 (+0)

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Issue API getrepoissuespagesummary failed: 429 Rate limit exceeded. Please try again later.

Detailed Description

D2 is a diagram scripting language that converts text descriptions into visual diagrams.

D2 solves the problem of creating and maintaining diagrams through code rather than graphical interfaces. It works by parsing a text-based syntax into structured diagram definitions, then rendering them to visual formats. This approach keeps diagrams version-controllable and enables programmatic generation. The tool supports multiple export formats and includes a live-reload development experience through its CLI, allowing developers to see changes to their diagram source reflected immediately in a browser.

D2 suits teams and projects that prioritize documentation-as-code workflows, where diagrams need to be tracked alongside source code and regenerated as part of build processes. It is particularly valuable for software architecture documentation, system design, and any scenario where diagrams are frequently updated. The project can be used both as a standalone CLI tool and as a Go library for embedding diagram generation into applications. D2 provides built-in themes for styling diagrams and ships with a default font, with options to customize both. The README references a comparison resource but does not make specific claims about how D2 differs from alternatives.

The project maintains active development with regular updates to both the core language and ecosystem. The tool has accumulated a collection of official plugins and community-contributed plugins that extend its capabilities. Documentation is comprehensive, including a cheat sheet and an interactive playground for learning the syntax. The codebase is written in Go and remains open to contributions, with clear installation documentation covering multiple operating systems and installation methods.