Skip to content

flexthink/vibeogram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vibeogram

Vibeogram is a Streamlit app for interactively creating and editing D2 diagrams with an agentic CLI such as OpenAI Codex.

Requirements

  • Python 3.10+
  • Streamlit
  • The d2 CLI on PATH for rendered SVG previews
  • The codex CLI on PATH for AI-assisted edits

Install Python Dependencies

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

Install D2

Vibeogram shells out to the d2 CLI to render previews and exports. After installing, verify that d2 is on your PATH:

d2 version

Recommended Install Script

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

macOS

With Homebrew:

brew install d2
d2 version

To install the latest source build through Homebrew:

brew install d2 --HEAD

Linux

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.

Windows

Use one of these options:

  • Download the Windows .msi installer from the D2 GitHub releases page. The installer adds d2 to PATH.
  • Use Scoop:
scoop install main/d2
d2 version
  • Use Chocolatey:
choco install d2
d2 version
  • Use WSL and follow the Linux instructions.

Install From Source

If you have Go installed:

go install oss.terrastruct.com/d2@latest
d2 version

D2 requires Go 1.20 or newer for source installs.

PNG Export Notes

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 Codex CLI

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.

Run

streamlit run app.py

The app stores editable .d2 files in diagrams/.

License

MIT. See LICENSE.

Sources

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors