mrkeyoor.com_
Thu 10 Sept 07:02 UTC
Dev Toolsevaluationupdated 10 Sept 2026

d2 review

D2 is a text language and command-line renderer for making diagrams that can live beside source code and documentation. You describe objects and connections in a `.d2` file, then D2 arranges them and exports the result as an image, document, or presentation file.

Verdict

Our D2 run installed 60 packages in 31 seconds and built in 75 seconds, but 2 of 138 Go test packages failed. D2 is still an easy recommendation for teams that want attractive architecture diagrams in version control and can verify the rendered output in CI. Hold off if an official LSP, a permissive license, or dependable bundled TALA behavior on dense graphs is a firm requirement.

We ran it

Lab card: what happened when we ran d2Screenshot of d2 (d2lang.com)
Install✓ · 31s60 packages
Build✓ · 75s
Tests✗ · 98s136 passed · 2 failed of 138 (go test)
Repo4533 files~314,100 lines of source · 102.5 MB · 8 CI workflows

Answers from our run

Does d2 build from source?

Dependencies installed in 31 seconds (60 packages), and the build succeeded in 75 seconds. We cloned commit 65a01bd into a clean Debian container with 3 CPUs and no project-specific setup.

Do d2's tests pass?

Not all of them: 136 of 138 passed and 2 failed when we ran the project's own test command (go test). Some failures need services or credentials a bare container does not have.

Who should not use d2?

People who need a point-and-click canvas as the primary editor: D2's source of truth is text, and the quick start edits a .d2 file.

What are the alternatives to d2?

Mermaid, PlantUML. Our D2 run installed 60 packages in 31 seconds and built in 75 seconds, but 2 of 138 Go test packages failed.

Setup4/5Install and build passed; 2 of 138 test packages failed
Docs5/5Syntax, install paths, exports, layouts, and integrations are covered
Community5/525,353 stars with current release, issue, and PR activity
Maturity4/5Broad export support, though v0.9.0 and TALA still have open edges

Who it’s for

Engineering teams that want architecture diagrams reviewed and versioned like code.
Documentation authors who need SVG, PNG, GIF, PDF, or PPTX output from one text source.
Developers who want live browser previews while editing diagrams locally.
Go applications that need to compile diagrams through a library rather than a separate hosted service.

Who it’s NOT for

People who need a point-and-click canvas as the primary editor: D2's source of truth is text, and the quick start edits a .d2 file.
Teams that require every upstream package test to pass in a clean Go container: our run reported 136 passed and 2 failed out of 138.
Owners of dense TALA diagrams who need a drop-in move from the old plugin: issue #2891 reports bundled TALA in v0.9.0 rejecting a 120-node, 100-edge case that the older plugin rendered.
Developers who need an official LSP today: the README lists an autoformatter and syntax highlighting but describes LSP support as an aspiration.
Organizations whose source policy excludes the Mozilla Public License 2.0: D2 uses MPL-2.0 rather than a permissive MIT or Apache license.

Setup reality

Our sandbox installed 60 packages in 31 seconds at commit 65a01bd, and the build succeeded in 75 seconds. Tests failed with exit 1 after 98 seconds: go test reported 136 passing packages and 2 failures out of 138. The supplied log tail ends at FAIL after listing successful library packages, so it does not identify the two failures.

Normal CLI use needs no account, API key, or hosted service. You supply a .d2 input and an output path, optionally selecting a layout engine or watch mode. The FAQ says D2 can run server-side and makes no network connection after installation except a periodic GitHub version check.

Prebuilt releases cover common systems, including a Windows MSI, and a canonical container image exists even though our repository scan found no Dockerfile. The current source-install guide requires Go 1.27. The install script is convenient, but the project recommends an OS package manager or Go's proxy-backed source install when possible.

D2 0.9.0 turns text into 5 export formats

D2 reads a small diagram language and decides where objects and connections should go. The quick start writes x -> y -> z to a file, watches it, and opens a browser preview that reloads after edits. The same source can produce SVG, PNG, GIF, PDF, or PPTX output. That makes diagrams reviewable in a pull request and keeps the editable form next to the document or system it explains.

The language is compact enough for a simple flow, yet the README example also shows nested containers, labeled links, shape choices, repeated objects, and style properties. D2 ships Source Sans Pro and has official themes. Go programs can call it as a library, while the standalone CLI can render without a browser on a server.

Three bundled layout engines trade control for automatic placement

D2 0.9.0 includes Dagre, ELK, and TALA layout choices. Dagre is the default layered engine, ELK is aimed at directed node-link diagrams with ports, and TALA targets software architecture diagrams. Plugins can replace the layout stage or change rendering. Most authors can start with relationships and let an engine place them, then switch engines when the default produces awkward routing or grouping.

Automatic layout also means the renderer owns decisions that a canvas editor exposes directly. Themes and style properties change appearance, but D2 is designed around declared structure rather than manual pixel placement. This is a good fit for diagrams that change with code. A marketing illustration or a carefully art-directed poster will usually be faster in a visual editor, where every bend and label position can be adjusted by hand.

What happened when we ran it

Our run cloned commit 65a01bd into an unprivileged Debian container with 3 CPUs and 8 GB of RAM. The 102.5 MB checkout contained 4,533 files and about 314,100 lines of source. Installation succeeded in 31 seconds and added 60 packages. Our measurement setup found 8 CI workflow files, no Dockerfile, and no directory named tests.

The build succeeded in 75 seconds. That result matters for contributors and teams embedding the Go library because the repository compiled in the stated clean image without an extra system-package failure. It does not measure diagram rendering speed or output quality. We did not run a visual comparison, a large-graph workload, or any of the performance cases discussed in the release notes.

The test command failed with exit 1 after 98 seconds. The Go summary counted 136 passing packages and 2 failing packages out of 138. Its final lines show successful results for libraries including PDF, PNG, PPTX, SVG, text measurement, and animated GIF output before the overall FAIL. The supplied tail does not name the two failing packages or show their error messages, so we cannot say which behavior failed or why.

Source installs require Go 1.27, while release binaries need no account

The current installation guide offers a shell script, Homebrew, standalone archives, Windows MSI files, community Windows package managers, source installation, and a published container image. It recommends a package manager or go install over piping the script when possible. The script supports a dry run, selects an install prefix, and checks a GitHub-provided archive digest when one is available. Source installs now require at least Go 1.27.

D2 needs no API key or hosted workspace. A command takes the local source and output file, and watch mode adds a browser preview. The canonical container is d2lang/d2, with amd64 and arm64 images described in the docs, despite the repository having no Dockerfile in our scan. Teams embedding fonts, remote images, or LaTeX labels should still test those assets in the same offline build job that produces their documentation.

Version 0.9.0 bundles TALA, with a reported 120-node limit case

Release v0.9.0 was published on September 7, 2026 and made TALA open source and bundled, including in the JavaScript and WebAssembly package. It also added built-in rendering for PNG, GIF, PDF, and PPTX and changed several compiler and export paths. For users of the former separate TALA plugin, the simpler installation is meaningful because no additional plugin or license key is required.

Open issue #2891 documents a counterexample worth testing before migration. Its reproduction creates 120 nodes and 100 cross-container edges. The reporter says the old TALA 0.4.3 plugin rendered it, while bundled TALA in D2 0.9.0 stops at a route-search work limit. ELK rendered that same reproduction according to the report. This is one submitted case, yet it is specific enough to add to an architecture team's acceptance set.

September 2026 activity is high, and the queue is large

GitHub showed 25,353 stars and 525 open issues and pull requests, with the last push on September 9, 2026. Recent activity included fixes and proposals for TALA routes, keyword casing, environment-controlled output, sequence diagrams, and isometric exports. The v0.9.0 release landed 2 days before that push. Those dates show maintainers and contributors working through a large combined queue, not a project coasting on old popularity.

D2's editor story is less finished than its renderer. The parser can report multiple errors, and the project has an autoformatter plus syntax highlighting. Official VS Code, Vim, and Obsidian integrations are linked from the README. The same README says the team has plans for LSP support, so buyers should read that as an aspiration rather than a current language server they can install.

Mermaid and PlantUML suit platforms that already speak their syntax

D2's 5 output formats and multiple layout engines make it a strong standalone documentation tool. Mermaid is the easier choice when GitHub, a wiki, or a static-site pipeline already renders Mermaid blocks without another binary. PlantUML has a longer-established Java toolchain and many specialized diagram forms. Choose D2 when layout quality and direct file exports justify adding its CLI; choose the syntax your publishing system already understands when operational simplicity matters more.

Alternatives

ProjectWhat it isPick it when
Mermaid gh↗A browser-oriented text diagram language widely embedded in Markdown renderers.pick this instead when your documentation platform already renders Mermaid and keeping diagrams inline matters most.
PlantUMLA long-running text diagram tool with many diagram families and Java-based rendering.pick this instead when you need PlantUML's established syntax, integrations, or specialized diagram types.

What people are saying

  1. [velocity-scout] d2lang/d2

Sources

  1. D2 README
  2. D2 installation guide
  3. D2 v0.9.0 release notes
  4. Issue 2891: bundled TALA work-limit reproduction

More dev tools reviews

lo · PEASS-ng · typst · imgui · gofr · CleanArchitecture · the whole board →