Vibeogram is a Streamlit app for interactively creating and editing D2 diagrams with an agentic CLI such as OpenAI Codex.
- Python 3.10+
- Streamlit
- The
d2CLI onPATHfor rendered SVG previews - The
codexCLI onPATHfor AI-assisted edits
pip install -r requirements.txt
If you use the project convention from AGENTS.md, install into ~/venv/ml:
~/venv/ml/bin/pip install -r requirements.txt
Vibeogram shells out to the d2 CLI to render previews and exports. After installing, verify that d2 is on your PATH:
d2 version
The D2 project recommends its install script for a quick setup. It detects your OS and architecture and chooses an installation method.
# Preview what the installer will do.
curl -fsSL https://d2lang.com/install.sh | sh -s -- --dry-run
# Install.
curl -fsSL https://d2lang.com/install.sh | sh -s --
For installer options:
curl -fsSL https://d2lang.com/install.sh | sh -s -- --help
With Homebrew:
brew install d2
d2 version
To install the latest source build through Homebrew:
brew install d2 --HEAD
The install script is the simplest cross-distribution path:
curl -fsSL https://d2lang.com/install.sh | sh -s --
d2 version
Void Linux has a package:
xbps-install d2
You can also download a release archive from GitHub and install it manually:
VERSION=v0.0.13
OS=linux
ARCH=amd64
curl -fsSLO "https://github.com/terrastruct/d2/releases/download/$VERSION/d2-$VERSION-$OS-$ARCH.tar.gz"
tar -xzf "d2-$VERSION-$OS-$ARCH.tar.gz"
make -sC "d2-$VERSION" install
Adjust VERSION, OS, and ARCH for your machine. Current release archives are available from the D2 releases page.
Use one of these options:
- Download the Windows
.msiinstaller from the D2 GitHub releases page. The installer addsd2toPATH. - Use Scoop:
scoop install main/d2
d2 version
- Use Chocolatey:
choco install d2
d2 version
- Use WSL and follow the Linux instructions.
If you have Go installed:
go install oss.terrastruct.com/d2@latest
d2 version
D2 requires Go 1.20 or newer for source installs.
SVG preview and SVG download only require the d2 CLI. PNG export may require D2 to install or use a browser driver such as Playwright/Chromium on first use. If PNG export hangs or fails, run a one-off PNG render from a normal terminal and let D2 finish any setup:
unset DEBUG
printf 'a -> b\n' > /tmp/test.d2
d2 --layout=dagre /tmp/test.d2 /tmp/test.png
Vibeogram sanitizes an invalid inherited DEBUG value when it calls D2, but unset DEBUG is still useful when testing D2 directly.
Install and authenticate the OpenAI Codex CLI separately. Vibeogram calls:
codex exec "<prompt>"
Make sure codex is available on PATH and already authenticated before using agent-assisted edits.
streamlit run app.py
The app stores editable .d2 files in diagrams/.
MIT. See LICENSE.
- D2 install docs: https://d2lang.com/tour/install/
- D2 detailed install guide: https://github.com/terrastruct/d2/blob/master/docs/INSTALL.md