← sources

I think in pictures, so I taught Claude Code to draw mermaid in the terminal

source: reddit (reddit:ClaudeAI)published 2026-10-28 16:36ingested 2026-10-29 02:37

retained text

I'm a visual person (not sure that's actually a thing, but it's how I'd describe myself). Before I build anything, I need to see it first: how the services talk, what happens on a failed payment, where the state changes. So the design stage always comes first for me, with sequence diagrams, activity flows, state machines and the odd C4, and only then do I start writing code.

These days I do that design work with Claude, from the CLI. Finished diagrams end up in my Obsidian vault, which I browse from the terminal with [emeraldian](https://github.com/iamrohithrnair/emeraldian), a TUI for Obsidian I also built. Getting them to finished is the fiddly bit, though. Claude Code writes lovely mermaid. It just can't show it to you. Every tweak meant copying the source into a viewer in another app, having a look, coming back, asking for a change, round again. Hard to iterate on a design you can't see.

So I made merman, a Claude Code mod that renders mermaid live, right in the terminal. Ask for a sequence diagram and the actual diagram appears in the reply. Move an arrow and it redraws. Flowcharts, sequence, state, class and ER diagrams all work, as do bar, line and pie charts and gantt. Tables come out properly coloured too.

As for the name, it felt only right. Who better to show off a mermaid than a merman?

\- A full reply renders in about 2 ms, so no lag

\- 16 colour themes, \`/merman theme nord\` to switch

\- About 355 tokens once per conversation (a small hint so Claude knows it can draw), or nothing if you switch that off

\- Claude Code's own UI is left alone, it only touches the replies

It installs as a Claude Code plugin, one line (needs 2.1.311+):

    claude plugin marketplace add iamrohithrnair/merman && claude plugin install merman@merman

Then /reload-plugins and /merman demo to see everything it draws.

[https://github.com/iamrohithrnair/merman](https://github.com/iamrohithrnair/merman) (MIT)

Note: C4 isn't supported yet, it stays as source for now. If you lean on C4 too, shout and I'll bump it up the list. Same for any diagram that comes out wonky. Send me the markdown and I'll have a look.

It started as a fork of prismantis, and Claude Code made most of the changes since, with me steering and checking every render. The focus was keeping it lean on speed, memory and tokens.

If you find this useful, a ⭐ on the repo would be much appreciated. It helps others discover it too. Thanks for the support!

document fetched 2026-10-29 00:22 · canonical https://reddit.com/r/ClaudeAI/comments/1xht43m/i_think_in_pictures_so_i_taught_claude_code_to