Command-line tool
d2
brew/d2
Checked 25 Oct 2026, 21:09 UTC · Listing refreshed from Homebrew, winget, npm, Scoop and cargo; npm packages checked against OSV.dev
Modern diagram scripting language that turns text to diagrams diagram script text-to-diagram modern scripting language text to diagrams
At a glance
- Type
- Command-line tool
- Install on
- Windows, macOS, Linux
- Last checked
- 25 Oct 2026, 21:09 UTC
Install it
Windows
winget install --id Terrastruct.D2 -e scoop install d2
macOS
brew install d2
Linux
brew install d2
Compile and render a D2 source file into an output file
d2 path/to/input_file.d2 path/to/output_file.ext
Watch live changes made to a D2 source file in the default web browser
d2 -w path/to/input_file.d2 path/to/output_file.ext
Format a D2 source file
d2 fmt path/to/input_file.d2
Related command-line tools
- arturo
Simple, modern and portable programming language for efficient scripting programming-language language interpreter… - Racket
Modern programming language in the Lisp/Scheme family - minimal-racket
Modern programming language in the Lisp/Scheme family programming-language racket - rad
Modern CLI scripts made easy - plantuml
Draw UML diagrams - texteditorpro
Powerful text editor with syntax highlighting for multiple languages and scripts. Formerly known as EditBone - dash-shell
POSIX-compliant descendant of NetBSD's ash (the Almquist SHell) - nushell
Modern shell for the GitHub era rust shell
Listing text is written by the maker; AptLynx lists tools and does not vouch for them. Find another tool · Browse by topic · For agents