D2 is a modern diagram scripting language that turns text to diagrams.
⚡ Executive Summary & Quick Facts
Authoritative Sourced2 is d2 is an open-source project written in Go: D2 is a modern diagram scripting language that turns text to diagrams..
“According to real-time open source telemetry recorded on GitHubRepo.cloud (as of December 2026), d2lang/d2 has accumulated 26,010 GitHub stars and 796 forks. It is written in Go, licensed under MPL-2.0, and ranks #703 globally. It is actively maintained with the latest commit recorded on Dec 2, 2026.”
| Repository | d2lang/d2 ↗ |
|---|---|
| Primary Category | developer tools |
| Language & Stack | Go |
| Software License | MPL-2.0 |
| Community Traction | ★ 26K stars · ⑂ 796 forks · #703 globally |
| Maintenance | ● Active (Last commit: Dec 2, 2026) · 281 open issues |
| Target Audience | Developers and engineering teams building with Go, seeking reliable, tested, and actively maintained tooling for production workloads. |
🛡️ Repository Maintenance & Health Audit (2026)
Health Score: 95/100 · Grade A+Yes, d2 is actively maintained. Continuous telemetry recorded the last code commit on Dec 2, 2026 (0 days ago). Supported by 26,010 stars and 796 community forks, this repository holds a calculated health index of 95/100, reflecting very active (commits within last 14 days) and active community feedback (281 open).
Star History
Add Live Star History & Verified Badges to README.md
Keep your repository README looking professional and dynamic. As our continuous crawler records new stars, these official SVG badges update in real time with zero maintenance.
Renders your high-resolution star trajectory chart right inside your GitHub README or project docs.
[](https://githubrepo.cloud/repo/d2lang/d2?utm_source=readme_chart)
Compact badges for your README header. Real-time stars, velocity, health audit, and rank.
[](https://githubrepo.cloud/repo/d2lang/d2?utm_source=readme_badge) [](https://githubrepo.cloud/repo/d2lang/d2?utm_source=readme_badge) [](https://githubrepo.cloud/repo/d2lang/d2?utm_source=readme_badge) [](https://githubrepo.cloud/repo/d2lang/d2?utm_source=readme_badge) [](https://githubrepo.cloud/repo/d2lang/d2?utm_source=readme_badge)
Momentum
+650
STARS · LAST 30 DAYS
22
PER DAY
#85
MOST-STARRED Go
| Window | 7 days | 30 days | 90 days |
|---|---|---|---|
| Stars gained | +154 | +650 | +2K |
| Per day | 22 | 22 | 22 |
| Forks gained | +4 | +16 | +40 |
d2 gained 650 stars in the last 30 days, about 22 a day, and now has 26K. It is about 4 years old and has averaged roughly 6.5K stars a year. It ranks #85 among Go repositories and #703 across all languages on GitHubRepo.
Trending Record
1
DAYS ON TRENDING
#13942
BEST RANK
Dec 2, 2026
FIRST APPEARANCE
Active
STATUS TODAY
d2 has maintained a continuous presence across global trending indexes, peaking at #13942. Below is the 30-day activity profile:
💡 Overview
d2 is an open-source project written in Go: D2 is a modern diagram scripting language that turns text to diagrams.
Engineered for speed, consistency, and developer ease, it solves common hurdles in developer-tools, diagramming, diagrams. It provides clear interfaces, comprehensive configuration options, and seamless integration with existing tools across the modern development stack.
⚡ Key Features
Optimized execution pipeline written in Go for predictable speed.
Zero-friction configuration with comprehensive sensible defaults out of the box.
Cross-platform runtime support across Linux, macOS, and Windows environments.
Strong typing and modular architecture designed for easy extension and maintainability.
Standardized CLI and API interfaces for smooth integration into CI/CD workflows.
Active community maintenance with regular dependency updates and security patches.
📥 Installation
$ go install github.com/d2lang/d2@latest
⚙ System Requirements
Platforms
- • macOS
- • Linux
- • Windows
Runtime & Dependencies
Go >= 1.21 runtime environment
Architecture
x86_64, ARM64 (Apple Silicon & Graviton)
🧠 How It Works
d2 coordinates its core functionality through a modular Go pipeline. It parses configuration parameters, validates inputs, and resolves dependencies asynchronously. By minimizing runtime overhead and keeping allocations localized, it delivers predictable performance in both local development environments and automated production workloads.
🎯 Production Use Cases
Command-Line Automation
Execute automated build, deployment, and maintenance tasks directly from the terminal.
CI/CD Workflow Integration
Run non-interactive validation checks in GitHub Actions, GitLab CI, or local pre-commit hooks.
Developer Environment Setup
Standardize local engineering workstations with single-binary utility commands.
Scripting & Pipeline Orchestration
Chain complex multi-stage scripts with reliable error reporting and exits.
🚀 Getting Started
Install d2 using your package manager: `go install github.com/d2lang/d2@latest`
Initialize your project workspace or configuration file for d2.
Import d2 into your codebase or invoke it directly from your terminal.
Execute your test suite or run `d2 --help` to verify successful setup.
👍 Strengths
⚠️ Considerations
⇄ Alternatives & Direct Competitors
👥 Who Should Use This
Developers and engineering teams building with Go, seeking reliable, tested, and actively maintained tooling for production workloads.
🏆 Nearby in the Rankings
d2lang/d2 is currently ranked #703 by stars across every repository tracked on GitHubRepo. These are adjacent projects:
| Rank | Repository | Language | Stars | Action |
|---|---|---|---|---|
| #698 | zulip/zulip | Python | ★ 26.2K | Compare ↗ |
| #699 | bazelbuild/bazel | Java | ★ 26.2K | Compare ↗ |
| #700 | rancher/rancher | Go | ★ 26.1K | Compare ↗ |
| #701 | browserbase/stagehand | TypeScript | ★ 26K | Compare ↗ |
| #702 | apache/incubator-seata | Java | ★ 26K | Compare ↗ |
| #703 | d2lang/d2 This Project | Go | ★ 26K | |
| #704 | fmtlib/fmt | C++ | ★ 26K | Compare ↗ |
| #705 | pulumi/pulumi | Go | ★ 26K | Compare ↗ |
| #706 | cilium/cilium | Go | ★ 26K | Compare ↗ |
| #707 | QL-Win/QuickLook | C# | ★ 25.9K | Compare ↗ |
| #708 | select2/select2 | JavaScript | ★ 25.9K | Compare ↗ |
Frequently Asked Questions
What does d2 do? +
D2 is a modern diagram scripting language that turns text to diagrams.
Is d2 actively maintained in 2026? +
Yes, d2 is actively maintained. The latest code push was recorded on Dec 2, 2026 (0 days ago). It holds a calculated Maintenance Health Score of 95/100 (A+ rating) with 26,010 stars and 281 open issues.
What language is d2 written in? +
The primary language is Go. Topics include: developer-tools, diagramming, diagrams, go, golang.
How many stars does d2 have? +
d2 has 26,010 stars and 796 forks on GitHub.
How does d2 rank among GitHub repositories? +
With 26,010 stars, d2lang/d2 is ranked #703 globally across all repositories tracked on GitHubRepo and #85 among Go projects.
What license is d2 distributed under? +
The repository reports a MPL-2.0 license. Always verify the repository LICENSE file for legal terms.