GitHub stars
25.6K#17 in the directory
Commits, last 12 months
324
Contributors
65
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,564 stars, 757 forks, and 65 contributors. It is actively developed with 324 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 Oct 2025 Nov Dec Jan 2026 Feb Mar Apr May Jun Jul Aug Sep
0100200 Oct 2025 Jan 2026 Apr Jul
324 commits from Oct 2025 to Sep 2026.
Show data as a table
D2 commits per month
MonthCommits
Oct 20257
Nov 20250
Dec 20250
Jan 20260
Feb 20260
Mar 20260
Apr 20262
May 20260
Jun 20260
Jul 20260
Aug 2026160
Sep 2026155

Popularity among Diagrams as code

GitHub stars for D2 and the most-starred alternatives.
Show data as a table
GitHub stars
ToolStars
Mermaid90,531
Diagrams42,673
D225,564
PlantUML13,352
Markmap13,147
flowchart.js8,700
Penrose7,985

Alternatives to D2

  • Mermaid

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

    90.5K starsTypeScriptMITD2 vs Mermaid

  • Diagrams

    Diagram as code in Python for prototyping cloud system architectures.

    42.7K 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.1K 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 324 commits in the last 12 months and the latest commit 2 days 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 Oct 4, 2026.