termaid is an open source Python package that draws
Mermaid diagrams as Unicode text.
Run it with uvx termaid, or install it with pip install termaid
to use it as a Python library.
It works in Claude Code too.
With the termaid plugin, Claude Code draws the Mermaid diagrams in Claude's replies as they stream,
and Claude still sees the Mermaid source. Install termaid with
brew install termaid or uv tool install termaid, then run
/plugin install termaid --marketplace fasouto/termaid in Claude Code 2.1.275 or later. On older versions, run /plugin marketplace add fasouto/termaid and then /plugin install termaid@termaid.
This page runs termaid in your browser with Pyodide, a build of Python for WebAssembly. Click an example to see a preview drawn ahead of time, or press Render to run your own Mermaid code. The first render takes a few seconds while Python loads.
The output needs a monospace font.
termaid supports 18 of Mermaid's diagram types: flowcharts, sequence diagrams, class diagrams, ER diagrams, state diagrams, block diagrams, git graphs, gantt charts, architecture diagrams, pie charts, treemaps, mindmaps, XY charts, user journeys, packet diagrams, timelines, kanban boards, and quadrant charts.