grok-mermaid
The diagram engine buried inside Elon Musk's Grok agent was open-sourced on a Wednesday and running in a browser tab by Thursday.
Paste a Mermaid diagram into this in-browser tool and it draws the flowchart, sequence, or state chart in plain terminal box characters, the kind you can drop straight into a README, a pull request, or a prompt without an image pipeline. Rendering Mermaid as text is not new; roughly five tools already do it. The engine doing it here is what sets it apart.
A 163-kilobyte single file pulled out of xAI's coding agent, compiled unchanged, and put behind a web page.
This is the exact Rust renderer that ships inside Grok Build, xAI's command-line coding agent, printing diagrams in the terminal. xAI open-sourced that CLI under an Apache licence on July 15 — shortly after researchers found the CLI had been uploading large chunks of users' code repositories to Google Cloud, which the company promised to delete. The day after the release, Simon Willison pulled one self-contained file out of it, compiled it unchanged to a 163-kilobyte WebAssembly module, and put it behind a web page. No rewrite: the browser is running the same code Grok runs, credited on the page to xAI.
That one-day turnaround is the point. Open source is often described as a slow commons; here a component built for one company's agent became a working public tool overnight, lifted verbatim by someone with no connection to the maker. Willison built the wrapper with a coding agent from a single published prompt, so the whole thing is a coding agent's output assembled from a piece of a rival coding agent — a full agent component in public hands the morning after it shipped.
Paste any Mermaid flowchart into the editor at tools.simonwillison.net/grok-mermaid and set the width to 80 columns to see the terminal output you'd copy into a README.
Get the tool at tools.simonwillison.net →The lenses
The facts
Concepts
How this connects
Tap a node to open it