d2
« Back to VersTracker
Description:
Modern diagram scripting language that turns text to diagrams
Type: Formula  |  Latest Version: 0.7.1@0  |  Tracked Since: Dec 17, 2025
Links: Homepage  |  @terrastruct  |  formulae.brew.sh
Category: Developer tools
Tags: diagrams visualization developer-tools productivity diagram-as-code
Install: brew install d2
About:
D2 is a modern diagram scripting language designed to turn text into diagrams dynamically. It allows developers to define complex layouts and relationships using a simple, readable syntax. The tool focuses on automating diagram generation for documentation, infrastructure, and code architecture.
Key Features:
  • Text-to-diagram conversion with a simple scripting language
  • Live reloading for instant visual feedback during editing
  • Flexible layout engine that automatically arranges elements
  • Support for exporting to SVG, PNG, and other formats
Use Cases:
  • Generating infrastructure and architecture diagrams from code
  • Creating documentation diagrams that are version-controlled
  • Visualizing complex data structures and relationships
Alternatives:
  • Graphviz – Graphviz uses DOT language and is older; D2 offers a more modern syntax and better automatic layout features.
  • Mermaid – Mermaid is JS-based and widely integrated; D2 provides a more powerful layout engine and standalone binary.
License: MPL-2.0
Bottles available for: arm64_tahoe, arm64_sequoia, arm64_sonoma, arm64_ventura, sonoma, ventura, arm64_linux, x86_64_linux
Version History
Detected Version Rev Change Commit
Oct 10, 2025 12:00pm 0 VERSION_BUMP cbdaf587
Sep 29, 2024 12:42am 0 VERSION_BUMP 280f4ca8