Move from Mermaid

open-diagram reads Mermaid flowcharts as they are, and lays them out again with the same measuring and layout checks as any other diagram.

Draw your file as it is

pip install open-diagram
open-diagram draw flow.mmd

It writes flow.svg and flow.png next to the file. The PNG is saved through Chrome, Chromium or Edge; add --no-png for the SVG only. If the layout has a problem, the command names it and exits with an error.

Or let your agent do it

The MCP server's check and draw tools take Mermaid text as well as JSON. Add the server, paste your flowchart, and ask for it drawn with open-diagram.

claude mcp add open-diagram -- uvx --python 3.12 --from "open-diagram[mcp]" open-diagram-mcp

The same flowchart, three ways

The photo upload flow from the Compare page: three subgraphs, ten boxes and ten lines.

Mermaid

The photo upload flow drawn by Mermaid

Mermaid CLI 12.2.0, default settings. Source

open-diagram, from the same Mermaid file

The same Mermaid file drawn by open-diagram

open-diagram draw photo-upload.mmd --title "Photo upload flow". Each <br/> became a space, so the bullet lines in each box run together.

open-diagram, from the flow written in JSON

The flow written in JSON, drawn by open-diagram

open-diagram draw photo-upload.json. Each box keeps its bullet lines, and the columns are chosen in the file. Source

What carries over

What changes

What it does not read

Rewrite it in JSON

JSON keeps each box's lines as a list, and lets you choose where every box goes. One box, two lines and one group from the photo upload flow, shortened:

Mermaid

subgraph Backend
  upload["Upload service<br/>• Checks file type<br/>• Saves original"]
end
upload -->|new photo| queue
feed -.-> recs

JSON

{"id": "upload", "title": "Upload service",
 "sections": [{"text": "• Checks file type\n• Saves original"}]}

{"from": "upload", "to": "queue", "label": "new photo"}
{"from": "feed", "to": "recs", "kind": "planned"}

{"label": "Backend",
 "members": ["gateway", "upload", "feed", "queue", "workers"]}

Every JSON key is in the README. The full files: photo-upload.mmd and photo-upload.json.