Automic VaultAutomic Vault

brew

d2 を Homebrew, dnf, MacPorts, Nix, pacman, zypper, scoop, winget でインストール

d2 のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

インストール

追加のインストールコマンド

macOS

Homebrew確認済み · 100%
brew install d2

local Homebrew formula metadata

MacPorts確認済み · 94%
sudo port install d2

MacPorts ports tree · graphics/d2/Portfile · ソース: api.github.com

Linux

Fedora dnf確認済み · 92%
sudo dnf install d2

Fedora Rawhide package metadata · d2 · ソース: dl.fedoraproject.org

Nix確認済み · 92%
nix profile install nixpkgs#d2

nixpkgs package indexes · pkgs/by-name/d2/d2/package.nix · ソース: api.github.com

Arch Linux pacman確認済み · 92%
sudo pacman -S d2

Arch Linux sync databases · d2 · ソース: geo.mirror.pkgbuild.com

openSUSE zypper確認済み · 92%
sudo zypper install d2

openSUSE Tumbleweed package metadata · d2 · ソース: download.opensuse.org

Windows

Scoop確認済み · 92%
scoop install main/d2

Scoop official bucket manifest trees · bucket/d2.json · ソース: api.github.com

Windows Package Manager確認済み · 92%
winget install --id Terrastruct.D2 -e

Windows Package Manager source index · Terrastruct.D2 · ソース: cdn.winget.microsoft.com

概要

パッケージ概要

Modern diagram scripting language that turns text to diagrams

コマンドとエイリアス

  • d2

履歴

プロジェクトの歴史と使われ方

D2 is a modern diagram scripting language and CLI that turns text files into diagrams, especially for software architecture and documentation workflows.

プロジェクトの歴史

The D2 repository was created in 2022 by Terrastruct. The README presents D2 as a language, command-line renderer, and Go library, with official documentation, a playground, themes, language tooling, plugins, and export formats.

採用の歴史

D2 entered the diagram-as-code ecosystem as another text-to-diagram option alongside tools such as Graphviz and Mermaid. Its README emphasizes package-manager installation, editor/tooling support, and a list of open-source projects that document with D2.

使われ方

The usual workflow is to write a .d2 file and run the d2 CLI to produce SVG, PNG, or PDF output. D2 can also be used as a Go library and can swap layout engines such as ELK or TALA.

パッケージ好きにとっての重要性

D2 is package-manager friendly because it ships as a single CLI for docs pipelines: install it with a system package manager, keep diagrams as source text, and regenerate images in builds or documentation sites.

タイムライン

  • 2022: D2 repository created.
  • 2022: Early v0.1.x tags published.
  • 2025: v0.7.1 release published.

Related projects

  • D2 relates to diagram-as-code tools, Graphviz-style layout engines, ELK, TALA, Go documentation pipelines, and editor plugins.

セキュリティ状態

リスクレベル: yellow

generalized runtime or code generation signal.

リスク分類器

リスク yellow · 信頼度 中 · runtime

理由

  • generalized runtime or code generation signal

信号

  • text:scripting language

インストール挙動

  • formula メタデータに Homebrew post-install フックは記録されていません。
  • Homebrew bottle メタデータは 8 個のプラットフォームターゲットで利用できます。
  • ビルドメタデータには 1 件のビルド依存関係があります。

推奨レビュー

エージェントに無人実行させる前に、このツールが平文の認証情報を読むか、リモート状態を書き込むか、成果物を公開するか、プラグインを起動するかを確認してください。

実行可能ファイル

インストールされる実行可能ファイル

コマンド種類公開範囲メモ
d2cliグローバル実行可能ファイル

鮮度

バージョンと鮮度

これらの信号は、ページ生成時期、パッケージマネージャの活動、上流リリース比較を分けて示します。バージョン遅れは、証拠 URL と比較可能なバージョンがある場合だけ警告されます。

ページ生成日2026-07-25
マネージャ版0.7.1
マネージャ更新日
ローカルデータOK
上流最新
検出された最新v0.7.1

https://github.com/terrastruct/d2

  • 情報No package-manager update timestamp was available.信頼度 低

インストールメタデータ

パッケージメタデータ

パッケージキーbrew:d2
バージョン0.7.1
パッケージマネージャHomebrew
パッケージマネージャページhttps://formulae.brew.sh/formula/d2
ホームページhttps://d2lang.com/
リポジトリhttps://github.com/terrastruct/d2
上流ドキュメントhttps://d2lang.com/
ライセンスMPL-2.0
ソースアーカイブhttps://github.com/terrastruct/d2/archive/refs/tags/v0.7.1.tar.gz
ビルド依存関係go
Bottle利用可能 (対象 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux)
Homebrew post-install未定義
サービス宣言なし

レジストリ情報

ソースデータベース詳細

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Named2
Version Scheme0
Revision0
Head VersionHEAD
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

ソースデータベース一致

他のパッケージマネージャ記録

一致は外部パッケージマネージャインデックスから取得され、ローカルの Automic Vault パッケージリンクとは分けて表示されます。

Nix95%

d2

nix profile install nixpkgs#d2
  • normalized package name match
  • 一致条件: D2
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/d2/d2/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
dnf95%

d2 0.6.9-8.fc44

Modern diagram scripting language that turns text to diagrams

https://github.com/terrastruct/d2

sudo dnf install d2
  • License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND FTL AND ISC AND MIT AND MPL-2.0
  • Category: Unspecified
  • Architecture: x86_64
  • Source Package: d2
  • 3 依存関係
  • 2 提供
  • normalized package name match
  • 一致条件: D2
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: d2 from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst
pacman95%

d2 0.7.1-2

A modern diagram scripting language that turns text to diagrams

https://d2lang.com

sudo pacman -S d2
  • License: MPL-2.0
  • Architecture: x86_64
  • 1 依存関係
  • normalized package name match
  • 一致条件: D2
Arch Linux sync databases · geo.mirror.pkgbuild.com · Arch Linux sync databases: d2 from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz
zypper95%

d2 0.7.1-1.4

CLI tool and modern declarative language that turns text to diagrams

https://github.com/terrastruct/d2

sudo zypper install d2
  • License: Apache-2.0 AND MIT AND MPL-2.0 AND EPL-2.0 AND GPL-2.0-or-later AND BSD-3-Clause
  • Category: Productivity/Text/Utilities
  • Architecture: x86_64
  • Source Package: d2
  • 1 依存関係
  • 1 提供
  • normalized package name match
  • 一致条件: D2
openSUSE Tumbleweed package metadata · download.opensuse.org · openSUSE Tumbleweed package metadata: d2 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst
MacPorts95%

d2

sudo port install d2
  • normalized package name match
  • 一致条件: D2
MacPorts ports tree · api.github.com · MacPorts ports tree: graphics/d2/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
Scoop95%

main/d2

scoop install main/d2
  • normalized package name match
  • 一致条件: D2
Scoop official bucket manifest trees · api.github.com · Scoop official bucket manifest trees: bucket/d2.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
winget95%

Terrastruct.D2

winget install --id Terrastruct.D2 -e
  • normalized package name match
  • 一致条件: D2
Windows Package Manager source index · cdn.winget.microsoft.com · Windows Package Manager source index: Terrastruct.D2 from https://cdn.winget.microsoft.com/cache/source.msix

ソース経路

リポジトリデータから生成

このページは scripts/generate-pkg-sqlite.py が生成した非公開のパッケージ SQLite アーティファクトから av-web によって提供されます。

Combined YAML source

View the package source record on GitHub.

combined/d2.yml

使用ソース

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment