d2

Из публичных источников

D2 — современный язык скриптов для диаграмм, который преобразует текст в диаграммы.

Машинный перевод · Показать оригинал

D2 is a modern diagram scripting language that turns text to diagrams.

CLI-инструментКатегория: Инструменты разработчика · ДокументированиеOpen sourceданные проверены 16 окт. 2026 г.

Обзор

  • developer-tools
  • diagramming
  • diagrams
  • go
  • golang
  • software-architecture
  • text-to-diagram

Установка

Команды только показываются, маркетплейс их не выполняет. Сверяйтесь с официальной документацией.
  • Официальный сайтИз публичных источниковиз метаданных каталога
    d2lang.com/ ↗
  • Файлы официального релизаИз публичных источниковиз последнего официального релиза
    github.com/d2lang/d2/releases/tag/v0.9.0 ↗
  • Сборка из исходниковИз публичных источниковиз метаданных каталога

    Сборка из исходников: проверенного рецепта сборки нет — следуйте инструкциям репозитория.

    github.com/d2lang/d2 ↗

Совместимость

«Неизвестно» значит, что доказательств не найдено, а не что продукт несовместим.
ПлатформаСтатусАрхитектураДоказательствоУверенность
WindowsСовместимоx86_64официальная сборка в релизе v0.9.0: d2-v0.9.0-windows-amd64.msi0.70
Совместимоarm64официальная сборка в релизе v0.9.0: d2-v0.9.0-windows-arm64.tar.gz0.70
macOSСовместимоx86_64официальная сборка в релизе v0.9.0: d2-v0.9.0-macos-amd64.tar.gz0.70
Совместимоarm64официальная сборка в релизе v0.9.0: d2-v0.9.0-macos-arm64.tar.gz0.70
LinuxСовместимоx86_64официальная сборка в релизе v0.9.0: d2-v0.9.0-linux-amd64.tar.gz0.70
Совместимоarm64официальная сборка в релизе v0.9.0: d2-v0.9.0-linux-arm64.tar.gz0.70
Container (OCI)Неизвестно———

Релизы

проверено 30 окт. 2026 г.
v0.9.0Последний7 сент. 2026 г.Официальный источник ↗

Файлы версии 0.9.0

Маркетплейс не хранит эти файлы: загрузка идёт из официального источника. Мы их не сканировали.
ФайлПлатформаРазмерSHA-256Скачать из официального источника
d2-v0.9.0-linux-amd64.tar.gzlinux · x86_64 · tarball17,2 MB5669ddc46b99…Официальный источник ↗
d2-v0.9.0-linux-arm64.tar.gzlinux · arm64 · tarball15,8 MBac2c02869719…Официальный источник ↗
d2-v0.9.0-macos-amd64.tar.gzmacos · x86_64 · tarball17,4 MBcad39576a480…Официальный источник ↗
d2-v0.9.0-macos-arm64.tar.gzmacos · arm64 · tarball16,3 MBeaf6c0c143e5…Официальный источник ↗
d2-v0.9.0-windows-amd64.msiwindows · x86_64 · msi14,8 MBdbac13edaec2…Официальный источник ↗
d2-v0.9.0-windows-amd64.tar.gzwindows · x86_64 · tarball17,4 MB5f63b643de8f…Официальный источник ↗
d2-v0.9.0-windows-arm64.tar.gzwindows · arm64 · tarball15,9 MBdd05cab45941…Официальный источник ↗
SHA256SUMSконтрольные суммы574 B0e6997fa55b9…Официальный источник ↗
d2.spdx.jsonSBOM23,7 KBefaf407d3142…Официальный источник ↗

История релизов

Профиль качества

алгоритм quality-v1.0 · оценено 16 окт. 2026 г.
Оценка качества95
Оценка риска0
Уверенность 1.00
Оценка качества и оценка риска — разные показатели. Высокое качество не гарантирует безопасность.

Составляющие оценки

Поддержка · 2020
last activity 4 days ago
Документация · 1515
README 15097 chars, description present
Готовность к использованию · 1515
install instructions: yes; releases: yes
Метаданные · 1010
4/4 of description, homepage, license, topics
Релизы · 1010
10 release(s), latest 38 days ago
Точность категории · 105
classifier confidence 0.5
Популярность · 1010
25618 stars (log-dampened, 10k = max)
Ясность лицензии · 55
SPDX MPL-2.0
Сообщество · 55
issues enabled, 766 forks

Лицензия

MPL-2.0
Лицензия известнапо данным хостинга репозитория

Это статус политики каталога, а не юридическое заключение.

Источники

github.com/d2lang/d2Основной★ 25 618 звёздактивность 11 окт. 2026 г.Основной репозиторий · Уверенность 1.00

Отзывы

Войдите, чтобы написать отзыв

Отзывов пока нет.

Альтернативы

App-Store-Connect-CLIПохожий
Быстрый CLI с поддержкой скриптов для App Store Connect API. Автоматизируйте TestFlight, сборки, отправку на проверку, подпись, аналитику, скриншоты, подписки и многое другоеMIT · Инструменты разработчика
tuiosПохожий
Менеджер терминальных окон, который знает, что делают ваши агенты. Разбиение на плитки, рабочие пространства, сессии, переживающие перезапуски, и единый Inbox для каждого агента программирования.MIT · Инструменты разработчика
go-recipesПохожий
🦩 Инструменты для проектов на GoMIT · Инструменты разработчика
go-modern-guidelinesПохожий
Помогите ИИ-агентам для программирования писать современный GoApache-2.0 · Инструменты разработчика
postingПохожий
Современный API-клиент, который работает в вашем терминале.Apache-2.0 · Инструменты разработчика
pyroscopeПохожий
Платформа непрерывного профилирования. Отладка проблем производительности вплоть до отдельной строки кодаAGPL-3.0 · Инструменты разработчика

README

Из d2lang/d2 · лицензия MPL-2.0 · загружено 30 окт. 2026 г.

Docs | Cheat sheet | Comparisons | Playground

[ci] [weekly race tests] [release] [changelog] [npm version] [discord] [license]

https://user-images.githubusercontent.com/3120367/206125010-bd1fea8e-248a-43e7-8f85-0bbfca0c6e2a.mp4

Table of Contents

  • What does D2 look like?
  • Quickstart
  • Install
  • D2 as a library
  • Themes
  • Fonts
  • Export file types
  • Language tooling
  • Layout engines
  • Comparison
  • Contributing
  • License
  • Related
    • Official plugins
    • Community plugins
    • Misc
  • FAQ
  • Notable open-source projects documenting with D2

What does D2 look like?

vars: {
  d2-config: {
    layout-engine: elk
    # Terminal theme code
    theme-id: 300
  }
}
network: {
  cell tower: {
    satellites: {
      shape: stored_data
      style.multiple: true
    }

    transmitter

    satellites -> transmitter: send
    satellites -> transmitter: send
    satellites -> transmitter: send
  }

  online portal: {
    ui: {shape: hexagon}
  }

  data processor: {
    storage: {
      shape: cylinder
      style.multiple: true
    }
  }

  cell tower.transmitter -> data processor.storage: phone logs
}

user: {
  shape: person
  width: 130
}

user -> network.cell tower: make call
user -> network.online portal.ui: access {
  style.stroke-dash: 3
}

api server -> network.online portal.ui: display
api server -> logs: persist
logs: {shape: page; style.multiple: true}

network.data processor -> api server

Open in playground

For more examples, see ./docs/examples.

Quickstart

The most convenient way to use D2 is to just run it as a CLI executable to produce SVGs from .d2 files.

# First, install D2
curl -fsSL https://d2lang.com/install.sh | sh -s --

echo 'x -> y -> z' > in.d2
d2 --watch in.d2 out.svg

A browser window will open with out.svg and live-reload on changes to in.d2.

Install

The easiest way to install is with our install script:

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

You can run the install script with --dry-run to see the commands that will be used to install without executing them.

Or if you have Go installed you can install from source though you won't get the manpage:

go install github.com/d2lang/d2@latest

You can also install a release from source which will include manpages. See ./docs/INSTALL.md#source-release.

To uninstall with the install script:

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

For detailed installation docs, see ./docs/INSTALL.md. We demonstrate alternative methods and examples for each OS.

As well, the functioning of the install script is described in detail to alleviate any concern of its use. We recommend using your OS's package manager directly instead for improved security but the install script is by no means insecure.

D2 as a library

In addition to being a runnable CLI tool, D2 can also be used to produce diagrams from Go programs.

For examples, see ./docs/examples/lib.

Themes

D2 includes a variety of official themes to style your diagrams beautifully right out of the box. See ./d2themes to browse the available themes and make or contribute your own creation.

Fonts

D2 ships with "Source Sans Pro" as the font in renders. If you wish to use a different one, please see ./d2renderers/d2fonts.

Export file types

D2 supports SVG, PNG, GIF, PDF, and PPTX exports.

Language tooling

D2 is designed with language tooling in mind. D2's parser can parse multiple errors from a broken program, has an autoformatter, syntax highlighting, and we have plans for LSP's and more. Good language tooling is necessary for creating and maintaining large diagrams.

The extensions for VSCode and Vim can be found in the Related section.

Layout engines

D2 bundles three layout engines. Select one with --layout=dagre, --layout=elk, or --layout=tala. You can also set D2_LAYOUT or vars.d2-config.layout-engine in D2 source. Run d2 layout to list the engines or d2 layout <name> for their configuration options.

  • Dagro (default, bundled): A native Go port of the Dagre directed graph layout engine that produces layered/hierarchical layouts. Based on Graphviz's DOT algorithm.
  • elk-go (bundled): A native Go port of the ELK directed graph layout engine, particularly suited for node-link diagrams with an inherent direction and ports.
  • TALA (bundled, opt-in): Native layout and edge-routing engine designed specifically for software architecture diagrams. Select it with --layout=tala, D2_LAYOUT=tala, or a layout-engine: tala setting under vars.d2-config in D2 source.

D2 also handles specialized layouts such as sequence diagrams and grids. Go applications can use the layout packages directly or provide layout and routing functions through d2lib.

Sketch-mode rendering uses rough-go, a native Go compatibility port of the Rough.js 4.6.6 rendering surface used by D2.

LaTeX labels use mathjax-go, a native Go port of the MathJax 3.2.2 TeX-to-SVG pipeline.

Comparison

For a comparison against other popular text-to-diagram tools, see https://text-to-diagram.com.

Contributing

Contributions are welcome! See ./docs/CONTRIBUTING.md.

License

Open sourced under the Mozilla Public License 2.0. See ./LICENSE.txt.

Related

We are constantly working on new plugins, integrations, extensions. Contributions are welcome in any official or community plugins. If you have somewhere in your workflow that you want to use D2, feel free to open a discussion. We have limited bandwidth and usually choose the most high-demand ones to work on. If you make something cool with D2 yourself, let us know and we'll be happy to include it here!

Official plugins

Community plugins

Misc

FAQ

  • Does D2 collect telemetry?
    • No, D2 does not use an internet connection after installation, except to check for version updates from Github periodically.
  • Does D2 need a browser to run?
    • No, D2 can run entirely server-side.
  • What's coming in the next release?
  • I have a question or need help.
    • The best way to get help is to ask on D2 Discord
  • I have a feature request, proposal, or bug report.
    • Please open up a Github Issue.
  • I have a private inquiry.

Notable open-source projects documenting with D2

Do you have or see an open-source project with .d2 files? Please submit a PR adding to this selected list of featured projects using D2.

Открыть репозиторий ↗