fasouto/termaid
Render Mermaid diagrams in your coding agent
What it solves
Termaid solves the problem of visualizing diagrams directly within terminal environments. It allows developers to render Mermaid diagrams—such as flowcharts, sequence diagrams, and gantt charts—without needing a browser or graphical interface, making it easier to document code or view architecture while working in the command line.
How it works
Termaid is a pure Python tool that converts Mermaid diagram syntax into text-based representations using box-drawing characters. It can read diagrams from files, standard input, or directly from Markdown documents. It automatically adjusts spacing and wraps labels to fit your terminal width. For advanced use, it integrates with Claude Code to render diagrams in real-time as the AI streams its response, and it offers optional support for colored output via Rich or interactive widgets via Textual.
Who it’s for
This tool is for developers, engineers, and technical writers who spend most of their time in the terminal and want to view or generate diagrams without leaving their workflow. It is particularly useful for those using Claude Code or managing documentation in Markdown files.
Highlights
- Supports 18 different diagram types, including flowcharts, sequence, ER, state, git, and gantt charts.
- Zero-dependency core written in pure Python.
- Automatic terminal fitting that tightens spacing and wraps text to prevent layout breakage.
- Real-time streaming support for rendering diagrams as they are generated by LLMs.
- Built-in support for 11 color themes and an ASCII-only mode for restricted terminals.
Related
- Project
- Project
- Project
- Project