Starting terminal…
Click the terminal and type to edit; the diagram redraws as you type. The buttons send the program's own keys: Next example (Ctrl+N), Theme (Ctrl+T), and Graphics (Ctrl+G, Kitty images or colored half blocks). More shows every key, including Quit (Ctrl+C); Keyboard focuses the terminal. The same keys are listed on the terminal's bottom line.
Run it in your terminal
The editor is an ordinary Bubble Tea program. In Kitty, Ghostty, or WezTerm it draws with Kitty graphics; anywhere else, with colored half blocks. It needs Go 1.26.8 or newer:
git clone https://github.com/neomantra/go-mermaid
cd go-mermaid
GOWORK=off go -C examples run ./editor
To build and serve this site locally (also needs Python 3):
make serve-site # http://localhost:8000/
To render diagrams from your own Go code, see the SVG playground.