# D2 (slim) > D2 is an open-source diagram scripting language that turns text into SVG, PNG, PDF, PPTX, GIF or ASCII diagrams. Agents run it as a local CLI, a Go library or the @d2lang/d2 WebAssembly package. - Full: https://www.anchorterminal.com/tools/d2.md (~5,400 tokens) · this version ~1,380 tokens · JSON https://www.anchorterminal.com/tools/d2.json · canonical https://www.anchorterminal.com/tools/d2 - Index: https://www.anchorterminal.com/llms.txt · API: https://www.anchorterminal.com/api/v1/index.json · Updated: 2026-10-09 **B · 65.3/100 · rank #295 of 842 · #2 in Diagramming · not agent-ready · confidence medium** Assessment: A single local command turns text into a diagram in six formats with no account, key or network call, and CI passes on the default branch. The language is at 0.9.0 with no stable release, its company sponsor has shut down, and one maintainer with limited time wrote every commit since July. ## Facts - Kind: SDK + MCP · vendor: D2 project (The Hack Foundation) · category: Diagramming · legal entity: The Hack Foundation (Hack Club), fiscal sponsor of the D2 project · provenance 63/100 - Packages: npm `@d2lang/d2`, go `github.com/d2lang/d2`, oci `d2lang/d2` - Auth: None · pricing: Free · x402: no · licence: MPL-2.0 - Probe metrics: not measured yet (probes haven't run) - Surfaces: CLI `d2`, Go packages `d2lib` (compile and render) and `d2oracle` (programmatic edits), and `@d2lang/d2` 0.1.34 for Node and browsers through WebAssembly - Export formats: SVG (default), PNG, PDF, PPTX, GIF and ASCII text. PNG needs no browser since 0.9.0 - Commands: `d2 in.d2 out.svg`, `d2 validate`, `d2 fmt` (with `--check`), `d2 layout`, `d2 themes`, `d2 play`, and `--watch` for live reload - Layout engines: Dagre (default), ELK and TALA, all bundled as Go code. TALA takes fixed positions for chosen nodes and routes the rest - Install: Install script, Homebrew (0.9.0), release archives for six platforms, a Windows MSI, Docker image `d2lang/d2`, or `go install`. Binaries built with Go 1.27 need macOS 13 or newer - Limits: 120 second default timeout (`--timeout`). PNG up to 32,768 pixels a side. The FAQ says D2 is not tested on thousands of nodes - Telemetry: None, per the FAQ, which adds that the CLI checks GitHub for new versions periodically - Governance: Fiscally sponsored by The Hack Foundation since August 2026, with a public fund at https://hcb.hackclub.com/d2. One lead maintainer - Scores: Reliability 68, Performance pending, Schema & documentation 65, Agent ergonomics 78, Security & auth 48, Payments & pricing 60, Task success pending, Maintenance & community 74, Transparency & trust 69 · total over the 7 assessed categories - Why: Reliability, Read with the local-software lines, because D2 runs on the owner's machine. · Schema & documentation, Read as a CLI and library. · Agent ergonomics, One command with text in and a diagram out, and no tool definitions to load (22). · Security & auth, No credential exists to leak or scope (20). · Payments & pricing, Read with the self-hosted rule. · Maintenance & community, Release 0.9.0 on 7 September 2026, 31 days before the check (20). · Transparency & trust, MPL-2.0 for the language, the renderers and TALA (30). - Sources: 13, open questions: 6, both in the full twin - Capabilities: diagram.as-code, diagram.create, diagram.export, diagram.edit, diagram.architecture - JSON: https://www.anchorterminal.com/api/v1/tools/d2.json - Verify (for the vendor): the badge `https://www.anchorterminal.com/badges/d2.svg` or a link to https://www.anchorterminal.com/tools/d2 from a page on d2lang.com or one of its subdomains, or the README of github.com/d2lang/d2, then `POST https://www.anchorterminal.com/api/v1/verify` `{"slug", "url"}` or `verify_listing` at /mcp; re-checked weekly, no effect on the grade. Snippets in the full twin. ## Before you call it 1. Check the exit status of `d2`, never the output file. The man page says a partial render can be written when an error occurs 2. Run `d2 validate file.d2` before rendering, and `d2 fmt` to normalise the source 3. Pass `-` for input and output and set `--stdout-format` (svg, png, ascii, txt, pdf, pptx or gif) to work without files 4. Use `--stdout-format ascii` when the reader is a text-only model 5. Pass `--bundle=false` or review image URLs and imports before rendering D2 text from an untrusted source. Release 0.9.0 fetches remote images when bundling ## Connect ```bash curl -fsSL https://d2lang.com/install.sh | sh -s -- # or: brew install d2, go install github.com/d2lang/d2@latest, npm install @d2lang/d2 ``` Full config and headless snippets are in the full page. Through letme (picks today, calling later): https://letme.dev/d2 ## Similar tools | Tool | Grade | Score | Shared capabilities | Slim | | --- | --- | --- | --- | --- | | draw.io + MCP | B | 62.2 | diagram.create, diagram.as-code, diagram.edit, diagram.export, diagram.architecture | https://www.anchorterminal.com/tools/drawio.min.md | | Structurizr + MCP | C | 59.9 | diagram.create, diagram.as-code, diagram.edit, diagram.export, diagram.architecture | https://www.anchorterminal.com/tools/structurizr.min.md | | Eraser API + MCP | E | 38.6 | diagram.create, diagram.as-code, diagram.edit, diagram.export, diagram.architecture | https://www.anchorterminal.com/tools/eraser.min.md | | PlantUML | B | 66.9 | diagram.as-code, diagram.create, diagram.export, diagram.architecture | https://www.anchorterminal.com/tools/plantuml.min.md | | tldraw SDK + MCP | C | 60.7 | diagram.create, diagram.as-code, diagram.edit, diagram.export | https://www.anchorterminal.com/tools/tldraw.min.md | ## Panel reviews (0, desk reviews from public material, no calls made)