Mermaid diagrams
Mermaid diagrams in your Markdown notes
Write a diagram as text and Koru draws it right in the note: flowcharts, sequence diagrams and pie charts, in your page's colors, on your own computer, with no internet needed. The text stays the source, so the diagram is easy to change, copy and export as Markdown.
Mermaid is a plain-text language for diagrams: a few lines describe the boxes and arrows, and a program draws them. In Koru, a code block whose language is Mermaid is drawn in place of its text, in the page's own colors and font, in light and dark themes.
There are several ways to start one:
- Type
/diagramor/mermaidin a document. - Choose Diagram from a row's
+, which starts from a small three-box example. - Type three backticks and
mermaid, then press Enter or Space. - Paste Markdown that holds a Mermaid block, or switch a code block's language chip to Mermaid.
- Let an AI agent write one for you over MCP.
This short block is a complete Mermaid flowchart. Under it is the diagram Koru draws from it.
flowchart LR
A[Write the text] --> B[Koru draws it]
B --> C[Save as PNG or SVG]
Koru draws three kinds of Mermaid diagram:
- Flowcharts:
flowchartorgraph, in any direction, withsubgraphgroups. - Sequence diagrams: participants and actors, every arrow style, notes, activations, and
loop,altandoptframes. - Pie charts: a title, a percentage on each slice, a legend, and
showDatafor the values.
Other Mermaid kinds keep their text, with a note that Koru does not draw that kind of diagram yet. Styling lines such as classDef and style are kept as written, and the theme decides the look.
Click a diagram to select it, then press Enter or the pencil to edit its text. The text opens above the drawing, which redraws as you type, and Esc closes it again.
If a line cannot be read, Koru names it, for example "Line 7: this line could not be read", and keeps the last good drawing, labeled, until you fix it. Open shows a diagram full-window, where you can zoom in on the details.
Screen readers hear each diagram described: its kind, how many parts it has, and every arrow or message.
Koru draws diagrams natively on your device, with no browser, web view or JavaScript, so they work offline. The text is the source of truth: the drawing is never stored or synced, and each device draws its own.
Your notes live in a local database on your own devices. When they sync, only the text travels, peer-to-peer and end-to-end encrypted between your devices. Koru is a native app for Windows, macOS (12 or later, on Apple silicon) and Linux.
Each diagram has a small bar in its corner with Open, Copy image, Save as and Edit text.
- Copy image puts a picture at twice screen size on the clipboard, ready for slides or chat.
- Save as writes a PNG at twice screen size, or an SVG that needs no fonts installed.
- Copy the block itself and it pastes as a diagram in Koru, and as a fenced
mermaidblock in other apps. - Markdown export keeps each diagram as its Mermaid text, in a fenced code block.
Claude, Claude Code or any other MCP client connected to Koru's local MCP server can write Mermaid diagrams into your notes. Every time the agent reads a diagram back, Koru tells it whether the diagram drew and, if not, why, so it can check its own work.
Ask it to sketch how a process flows, or the sequence of an API call, and it lands as a real diagram you can edit.
Koru is free, and so is peer-to-peer sync between your devices. Koru Cloud is optional at $9.99/month for 100 GB.
Flowcharts, sequence diagrams and pie charts. Other Mermaid kinds stay as text in the note, with a note that Koru doesn't draw them yet.
Yes. Koru draws them on your own computer, with no browser, web view or internet connection.
Yes. Choose Save as in the diagram's corner bar for a PNG or an SVG, or use Copy image to paste a picture into slides or chat.
Yes. Connect Claude, Claude Code or another MCP client to Koru's local MCP server and it can add Mermaid diagrams to your notes and check that they drew. Koru works with the AI you choose.
A Mermaid code block in imported or pasted Markdown, including a page pasted from Notion, becomes a diagram in Koru, and exports back to Markdown as the same text.
Last updated
