@rolled-potatoes/opencode-mermaidOpenCode plugin — render Mermaid diagrams in the browser
1
80
14 in 7 days
25.8
Multi-signal model
5 months ago
2026-03-15
Install and configure
opencode.jsonWrites to this project's opencode.json — applies to this repository only.
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@rolled-potatoes/opencode-mermaid@0.2.0"]
}Writes to ~/.config/opencode/opencode.json — applies to every project.
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@rolled-potatoes/opencode-mermaid@0.2.0"]
}If you want to modify the plugin locally, install it into the project and reference the local path.
shell
pnpm add -D @rolled-potatoes/opencode-mermaidopencode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.
An OpenCode plugin that renders Mermaid diagrams in your browser.
Whenever the AI writes a mermaid code block, it automatically calls render_mermaid to open the diagram in your default browser. Multiple diagrams within the same session are accumulated in a single HTML file.
Install
Add the package name to the plugin array in your opencode.json:
{
"plugin": ["@rolled-potatoes/opencode-mermaid"]
}
OpenCode will install it automatically on next start.
Features
- Opens diagrams in the browser via a local HTML file (
/tmp/mermaid-<sessionID>.html) - Accumulates all diagrams from a session in one file — just refresh the tab
- Collapsible source view for each diagram
- Cross-platform: macOS (
open), Linux (xdg-open), Windows (start) - Uses Mermaid.js v11 via CDN — no build step needed
Supported diagram types
flowchart, sequence, class, pie, gantt, state, ER, mindmap, timeline, git graph, and anything else Mermaid supports.
License
MIT