# d2 mit Homebrew, dnf, MacPorts, Nix, pacman, zypper, scoop, winget installieren

Prüfe Installationswege, Executables, Metadaten und Sicherheitshinweise für d2 in AI-Agent-Workflows.

## Installation

```sh
sudo av install brew:d2
```

Weitere Installationsbefehle:

### macOS

- Homebrew (100%):

```sh
brew install d2
```

  Evidenz: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install d2
```

  Evidenz: MacPorts ports tree: graphics/d2/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- dnf (92%):

```sh
sudo dnf install d2
```

  Evidenz: Fedora Rawhide package metadata: d2 from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#d2
```

  Evidenz: nixpkgs package indexes: pkgs/by-name/d2/d2/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S d2
```

  Evidenz: Arch Linux sync databases: d2 from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install d2
```

  Evidenz: openSUSE Tumbleweed package metadata: d2 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

### Windows

- Scoop (92%):

```sh
scoop install main/d2
```

  Evidenz: Scoop official bucket manifest trees: bucket/d2.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id Terrastruct.D2 -e
```

  Evidenz: Windows Package Manager source index: Terrastruct.D2 from https://cdn.winget.microsoft.com/cache/source.msix

## Paketfakten

- **Paketschlüssel:** brew:d2
- **Paketmanager:** Homebrew
- **Version:** 0.7.1
- **Quellzusammenfassung:** Modern diagram scripting language that turns text to diagrams
- **Homepage:** <https://d2lang.com/>
- **Repository:** <https://github.com/terrastruct/d2>
- **Zuletzt aktualisiert:** 2026-08-01T19:58:36-07:00
- **Generiert:** 2026-08-03T19:37:03+00:00

## Executables

- d2 (Alias)

## Installationsverhalten

- Bottle: nicht verfügbar

## Version und Aktualität

- Seite generiert: 2026-08-03
- Manager-Version: 0.7.1
## Projektgeschichte und Nutzung

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

### Projektgeschichte

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.

### Adoptionsgeschichte

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.

### Wie es verwendet wird

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.

### Warum Paket-Nerds sich dafür interessieren

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.

### Zeitleiste

- 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.

### Quellen

- <https://github.com/terrastruct/d2>
- <https://api.github.com/repos/terrastruct/d2>
- <https://github.com/terrastruct/d2/releases/tag/v0.7.1>
- <https://d2lang.com/>


## Sicherheitshinweise

generalized runtime or code generation signal.

- **Geiger-Risiko:** yellow / mittel
- generalized runtime or code generation signal

## Andere Paketmanager-Einträge

- Nix - d2: normalized package name match | nixpkgs package indexes: pkgs/by-name/d2/d2/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- dnf - d2 - 0.6.9-8.fc44: normalized package name match | Fedora Rawhide package metadata: d2 from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Modern diagram scripting language that turns text to diagrams | https://github.com/terrastruct/d2
- pacman - d2 - 0.7.1-2: normalized package name match | Arch Linux sync databases: d2 from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A modern diagram scripting language that turns text to diagrams | https://d2lang.com
- zypper - d2 - 0.7.1-1.7: normalized package name match | openSUSE Tumbleweed package metadata: d2 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | CLI tool and modern declarative language that turns text to diagrams | https://github.com/terrastruct/d2
- MacPorts - d2: normalized package name match | MacPorts ports tree: graphics/d2/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/d2: normalized package name match | Scoop official bucket manifest trees: bucket/d2.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - Terrastruct.D2: normalized package name match | Windows Package Manager source index: Terrastruct.D2 from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

View the package source record on GitHub. [combined/d2.yml](https://github.com/mxcl/pkgdb/blob/main/combined/d2.yml)


## Quellen

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