<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: yk</title>
    <description>The latest articles on DEV Community by yk (@m8524769).</description>
    <link>https://dev.to/m8524769</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4030683%2F1fdd8d74-23c9-4267-ba47-cd916732e81a.jpg</url>
      <title>DEV Community: yk</title>
      <link>https://dev.to/m8524769</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/m8524769"/>
    <language>en</language>
    <item>
      <title>Mermaid Code: A Local-First Diagram Editor Built for the AI Coding Era</title>
      <dc:creator>yk</dc:creator>
      <pubDate>Wed, 15 Jul 2026 15:54:30 +0000</pubDate>
      <link>https://dev.to/m8524769/mermaid-code-a-local-first-diagram-editor-built-for-the-ai-coding-era-51o0</link>
      <guid>https://dev.to/m8524769/mermaid-code-a-local-first-diagram-editor-built-for-the-ai-coding-era-51o0</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fa2zxwlh8xgzpxol5s1of.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fa2zxwlh8xgzpxol5s1of.png" alt=" " width="800" height="486"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you've used AI coding agents like Claude Code or Codex to generate architecture diagrams, you've probably hit the same friction: the agent writes Mermaid code, but to see it rendered you have to copy it into a browser, open mermaid.live, paste, wait. Change one line, repeat the whole cycle.&lt;/p&gt;

&lt;p&gt;I built &lt;strong&gt;Mermaid Code&lt;/strong&gt; to eliminate that loop entirely.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem with Browser-Based Editors
&lt;/h2&gt;

&lt;p&gt;Mermaid Live Editor is great for one-off diagrams. But when diagrams become part of your codebase — living next to the code they describe — the browser workflow breaks down:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every edit requires a new URL or a manual paste&lt;/li&gt;
&lt;li&gt;Files don't persist; you lose work on tab close&lt;/li&gt;
&lt;li&gt;AI agents can't access your browser tab&lt;/li&gt;
&lt;li&gt;There's no way to manage a folder of diagrams&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cloud solutions like Mermaid Chart solve some of this, but unlimited storage requires a paid subscription.&lt;/p&gt;




&lt;h2&gt;
  
  
  Enter Mermaid Code
&lt;/h2&gt;

&lt;p&gt;Mermaid Code is a free, open-source desktop app (macOS and Windows) that treats &lt;code&gt;.mmd&lt;/code&gt; files as first-class citizens. Diagrams live on your filesystem, alongside your code, like any other source file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fct3dh21xs4ntourxou5y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fct3dh21xs4ntourxou5y.png" alt=" " width="780" height="650"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Open a folder, and you get a full file manager sidebar. Create, rename, delete &lt;code&gt;.mmd&lt;/code&gt; files without leaving the editor. Switch between diagrams with tabs. Come back tomorrow and your tabs are exactly where you left them.&lt;/p&gt;




&lt;h2&gt;
  
  
  The AI Workflow That Actually Works
&lt;/h2&gt;

&lt;p&gt;Here's what the workflow looks like with an AI agent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You: "Generate a sequence diagram for the OAuth flow and save it to docs/auth.mmd"

Agent: [writes docs/auth.mmd]

Mermaid Code: [detects the change, renders preview instantly]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No copy-pasting. No browser. No URL sharing. The file watcher picks up changes the moment the agent writes them, and the preview refreshes automatically.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpzyyesmesthi4qsdlbl0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpzyyesmesthi4qsdlbl0.png" alt=" " width="800" height="486"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This closes a loop that browser-based editors structurally can't close — because they have no access to your local filesystem. And since everything stays local, sensitive diagrams — architecture diagrams, database schemas, internal system topologies — never leave your machine. No terms of service, no data retention policies to worry about.&lt;/p&gt;




&lt;h2&gt;
  
  
  Thumbnail Grid: Navigate Diagrams Visually
&lt;/h2&gt;

&lt;p&gt;When you have dozens of diagrams in a project, the file tree gets unwieldy. Mermaid Code has a thumbnail grid view that shows SVG previews of every diagram in your folder and its subdirectories.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxs0yyye9htk4y4crj6ya.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxs0yyye9htk4y4crj6ya.png" alt=" " width="780" height="1244"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click a thumbnail to open it. Search by filename. The grid works across nested subdirectories, so even a sprawling &lt;code&gt;docs/&lt;/code&gt; folder is navigable at a glance.&lt;/p&gt;




&lt;h2&gt;
  
  
  Features Worth Mentioning
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Vim mode&lt;/strong&gt; — if you live in Vim, the editor has full Vim keybindings including &lt;code&gt;:w&lt;/code&gt; to save and &lt;code&gt;:q&lt;/code&gt; to close a tab.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0yxfix3inj4pcnnh0urk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0yxfix3inj4pcnnh0urk.png" alt=" " width="794" height="57"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Config form&lt;/strong&gt; — set theme, layout engine (dagre/elk/tidy-tree), and look without touching JSON. A "Pin to code" button inserts the config as YAML frontmatter directly into the diagram file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe2o1xlv8v4zi4pc81fqe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe2o1xlv8v4zi4pc81fqe.png" alt=" " width="799" height="518"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Presentation mode&lt;/strong&gt; — press the expand button to go fullscreen with the sidebar still visible. Switch between diagrams during a presentation without exiting fullscreen.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3in5oee8wszvfs63bis9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3in5oee8wszvfs63bis9.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Auto-update&lt;/strong&gt; — the app checks for new versions on launch and downloads in the background.&lt;/p&gt;




&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;macOS (Homebrew):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew tap m8524769/tap
brew &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--cask&lt;/span&gt; mermaid-code
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;macOS / Windows (direct download):&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://github.com/m8524769/mermaid-code/releases" rel="noopener noreferrer"&gt;github.com/m8524769/mermaid-code/releases&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;macOS note: the app is not signed with an Apple Developer certificate. On first launch, go to &lt;strong&gt;System Settings → Privacy &amp;amp; Security&lt;/strong&gt; and click &lt;strong&gt;Open Anyway&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  It's Free and Open Source
&lt;/h2&gt;

&lt;p&gt;Mermaid Code is MIT-licensed and built on top of the excellent &lt;a href="https://github.com/mermaid-js/mermaid-live-editor" rel="noopener noreferrer"&gt;mermaid-live-editor&lt;/a&gt;. The desktop layer is &lt;a href="https://tauri.app" rel="noopener noreferrer"&gt;Tauri&lt;/a&gt;, which keeps the binary small and the memory footprint low compared to Electron alternatives.&lt;/p&gt;

&lt;p&gt;If this solves a pain point for you, a GitHub star helps others find it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;→ &lt;a href="https://github.com/m8524769/mermaid-code" rel="noopener noreferrer"&gt;github.com/m8524769/mermaid-code&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




</description>
      <category>diagram</category>
      <category>mermaid</category>
      <category>flowchart</category>
      <category>tauri</category>
    </item>
  </channel>
</rss>
