pkg.soopen package index

brew / 排名 1158

使用 Homebrew, dnf, MacPorts, Nix, pacman, zypper, scoop, winget 安装 d2

查看 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

安装行为

  • 未记录 Homebrew bottle 元数据。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

可执行文件

已安装的可执行文件

命令类型暴露范围备注
d2可执行文件已索引可执行文件从本地可执行文件索引发现。

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-08-03
管理器版本0.7.1
管理器更新时间2026-08-01
本地数据未知
上游不可用
检测到的最新版本未检测到
  • OK没有生成新鲜度警告。

安装元数据

软件包元数据

软件包键brew:d2
版本0.7.1
软件包管理器Homebrew
主页https://d2lang.com/
仓库https://github.com/terrastruct/d2
最后更新2026-08-01T19:58:36-07:00
Pulseupdated
Bottle未记录
服务未声明

源数据库匹配

其他软件包管理器记录

匹配项来自外部软件包管理器索引,并与本地 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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.7

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/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-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

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

Combined YAML source

View the package source record on GitHub.

combined/d2.yml

使用的来源

  • Geiger risk classifier
  • cross-ecosystem install command graph
  • curated package history
  • external package-manager database matches
  • pkg.so package database
  • pkgdb category and tag curation