GitHub stars
25.9K#18 in the directory
Commits, last 12 months
328
Contributors
66
Last commit
Latest release
v0.9.0Sep 7, 2026

Overview

D2 is an open-source diagram-as-code tool released under the MPL-2.0 license. Its GitHub repository has 25,859 stars, 779 forks, and 66 contributors. It is actively developed with 328 commits in the last 12 months. The latest release, v0.9.0, was published on Sep 7, 2026.

Its GitHub description: D2 is a modern diagram scripting language that turns text to diagrams.

GitHub topics: diagrammingdiagramstext-to-diagramsoftware-architecturegogolangdeveloper-tools

Install

Go
go get github.com/d2lang/d2
vv0.9.0

Development activity

Commits per month to the default branch over the last 12 complete months.

0100200 Nov 2025 Dec Jan 2026 Feb Mar Apr May Jun Jul Aug Sep Oct
0100200 Nov 2025 Feb 2026 May Aug
328 commits from Nov 2025 to Oct 2026.
Show data as a table
D2 commits per month
MonthCommits
Nov 20250
Dec 20250
Jan 20260
Feb 20260
Mar 20260
Apr 20262
May 20260
Jun 20260
Jul 20260
Aug 2026160
Sep 2026158
Oct 20268

Popularity among Diagrams as code

GitHub stars for D2 and the most-starred alternatives.
Show data as a table
GitHub stars
ToolStars
Mermaid91,143
Diagrams42,818
D225,859
PlantUML13,425
Markmap13,260
flowchart.js8,701
Penrose8,014

Alternatives to D2

  • Mermaid

    Generate diagrams and flowcharts from markdown-like text definitions, with a live editor.

    91.1K starsTypeScriptMITD2 vs Mermaid

  • Diagrams

    Diagram as code in Python for prototyping cloud system architectures.

    42.8K starsPythonMITD2 vs Diagrams

  • PlantUML

    Generates UML, Gantt, mind map and other diagrams from plain text.

    13.4K starsJavaLGPL-3.0D2 vs PlantUML

  • Markmap

    Builds interactive mind maps from Markdown.

    13.3K starsTypeScriptMITD2 vs Markmap

  • flowchart.js

    Draws SVG flowcharts from a textual description.

    8.7K starsJavaScriptMIT

  • Penrose

    Creates diagrams from mathematical notation in plain text, from Carnegie Mellon University.

    8K starsTypeScriptMIT

More comparisons: D2 vs Mermaid · D2 vs Diagrams · D2 vs PlantUML · D2 vs Markmap

D2 FAQ

Is D2 open source?

Yes. D2 is released under the MPL-2.0 license, and its source code is on GitHub.

Is D2 still maintained?

Yes. D2 is actively developed, with 328 commits in the last 12 months and the latest commit 1 month ago.

How do I install D2?

From Go: go get github.com/d2lang/d2.

What are the best alternatives to D2?

The most popular alternatives listed in Diagrams as code are Mermaid, Diagrams, and PlantUML. See the full ranking.

What language is D2 written in?

D2 is primarily written in Go, according to GitHub.

Data: GitHub API, Go. Updated Nov 18, 2026.