Create

Sign in to ReadmeX

or

How we handle your data: Privacy Policy

ReadmeX

Your AI reading companion

What would you like to catch up on?

Pick a briefing, or ask your own question.

Your community and people briefings stay personal to you.

d2

d2: A modern diagram scripting language that turns text to diagrams.

What problem it solves

Teams need to create diagrams from text while supporting validation, live previews, programmatic rendering, and integration with documentation and development workflows. D2 addresses these needs through a command-line interface, language libraries, editor support, and community integrations.

Key features

  • Text-based diagram creation — Create a diagram by saving relationships such as `x -> y -> z` in a `.d2` file, then render it from the command line.

    Source: README, d2compiler, d2renderers

  • Validation and diagnostics — Check diagrams for errors and warnings, enforce a zero-warning threshold in CI, or obtain diagnostics programmatically as JSON.

    Source: README, d2lint

  • Live preview workflow — Run the CLI in watch mode to preview a diagram in a browser and update it while editing the source file.

    Source: README

  • Go and JavaScript libraries — Render diagrams from Go or JavaScript and TypeScript, with validation APIs that report source ranges and rule codes.

    Source: README, d2js

  • Language tooling and integrations — The project includes structural and lexical grammars, conformance cases, official plugins, and community integrations for editors, documentation systems, and diagram workflows.

    Source: README, d2lsp

Quick start

Copied verbatim from the project's README.

curl -fsSL https://d2lang.com/install.sh | sh -s --
d2 hello.d2

Who it may suit

Inference: D2 may suit developers, technical writers, documentation teams, and architects who want a text-based workflow for creating and validating diagrams. It may also suit Go or JavaScript projects that need to generate diagrams programmatically.

Topics to discuss

  • Which diagram workflows or integrations should the community prioritize next?

  • How can contributors improve conformance cases, grammar documentation, and editor support?

  • Which visualization and export capabilities need better examples or discussion?


Written by ReadmeX AI from the project's README, source and public GitHub data; it may contain mistakes.

Read the original README https://github.com/d2lang/d2#readme

ReadmeX opened this community for a trending project; it is not run by the project. Maintainers can claim it from the community page.

github.comhttps://github.com/d2lang/d2

Comments

…