Skip to content
Mernyx

By isaced

A Mermaid editor for the AI era is a loop

AI drafts, you adjust on the canvas, the change is written back into Mermaid source, and AI picks up from the latest version — a loop that only works because native rendering makes every step instant and the three views share one document.

Three translucent rounded page outlines stacked with a slight offset on a near-black ground, crossed by one thin coral line with a small white node on each sheet.

Native, so every change happens at once

Whether the loop turns at all comes down to one thing: how soon you see the result of a change. Mernyx is a native Mac app — no WebView, no JavaScript bridge, no Electron. Rendering, layout and export all run on the machine: change a line of source and the canvas redraws at once; drag a node and the source is rewritten at once.

This is not about being a little faster. It takes waiting out of the workflow. A single round trip already redraws several times — AI drafts, you move a node, AI takes over again. Put a browser round trip in the middle and you start hesitating over the next tweak. Only when the response is instant is the loop worth running again and again.

Because the renderer is Mernyx’s own, a diagram AI generated and one you drew by hand come out of the same engine; what you preview is what you export. The .mmd stays an ordinary file too, opened from Finder and previewed with Quick Look, no different from any other document.

A single page holds text on the left and a drawing on the right; one coral thread links a line of text to a node.
The source and the picture are one document, not two files.

Visual editing only works because it writes back

Source, canvas and inspector are not three things but three views of one document. Drag a node and the Mermaid source is rewritten. Type a line and the canvas redraws. Change a fill in the inspector and a style rule appears in the text. Nothing is imported, converted or kept as a copy in a sidecar file.

This is what lets AI take the next turn. You edit a picture; what lands in the file is source. The AI that reads the document next sees the version you changed, not the one it first produced. If the canvas were only a preview, people and AI would have to pass changes back and forth by copy and paste, and the loop would break at the first step.

Visual editing also lowers the barrier: you can move nodes and change colours without knowing Mermaid syntax, and a glance at the drawing tells you faster than reading the text whether AI understood you. Every edit lands in one undo history, so ⌘Z takes you back in a single step.

Mernyx renders 34 diagram families and does not pretend each one can be edited to the same depth. The capability matrix says, family by family, what the canvas can change. A limit stated before you pay is better than one you discover afterwards.

Three simple panels for the text, the drawing and the properties; one coral value runs through all three.
Three views, one document: the same change is visible in the text, the drawing and the properties.

The AI-era drawing workflow is a loop

Put the first two together and the workflow looks like this: AI produces a first draft, you fine-tune it on the canvas, the change is written back into the Mermaid source, AI continues from that latest source, the canvas redraws, you fine-tune again — and so on until it is right. This loop runs today.

Concretely, Generate (⇧⌘G) starts at the bottom of the canvas: write a sentence and the source streams into the editor line by line while the canvas draws it as it arrives. If it does not parse, the model tries again. Nothing in the file changes until you press Apply.

Fix with AI (⌥⌘F) goes the other way: hand it a diagram that will not compile and it comes back with a line-by-line diff. Apply appears only when the error count actually falls. Choose Discard and nothing is left behind — not in the file, not in the undo stack. Apply is one replacement that ⌘Z can undo.

The model writes Mermaid and nothing else; compiling, layout and drawing still belong to Mernyx. It runs on your endpoint and your key — OpenAI, OpenRouter, DeepSeek, Groq, or a local model through Ollama or LM Studio — with the key in the macOS keychain and no account or relay server in between.

What matters is not that AI can draw a diagram, but that it edits the same document you do. What passes between you is source, not a screenshot and not a chat log; every round is readable, reviewable and reversible, which is what makes the loop worth running again.

Three rounded panels linked by coral arrows, with a long coral line curving back from the last to the first and two white nodes on the way.
The loop: AI drafts, a person adjusts, the source is rewritten, and AI picks up from there.

The source is the one thing that stays

In this loop the model can change, the endpoint can change, the canvas can be closed — the .mmd file stays the same one. It opens in any tool, diffs line by line in git, and still renders years later.

AI writes it, you change it, the next round of AI reads it. The source is the one fact; everything else is a replaceable part.

Mernyx 1.0 makes the loop real: native rendering, visual write-back, reviewable AI edits.

What is still missing is an AI that understands what a diagram means — crossing edges, branches with the same name, a call that never returns — and hands the suggestion back as a diff you can read.

The goal is not for AI to finish the diagram for you. It is to make moving between the drawing and the text easy enough that you can keep going until the picture says exactly what you meant.