← All tools

fasouto/termaid

Popularity 75 Updated Development & Build

Render Mermaid diagrams in your terminal or Python app

githubauto-collected

Installation

A directly usable install command is not verified yet. Check the project documentation or releases.

<h1 align="center"termaid</h1

<p align="center"Render Mermaid diagrams in your terminal or Python app.</p

<p align="center" <img src="termaid-demo.gif" alt="termaid demo" width="800" </p

Try it online at termaid.com

Features

  • 18 diagram types: flowcharts, sequence, class, ER, state, block, git, gantt, architecture, pie, treemap, mindmap, timeline, kanban, quadrant, XY chart, user journey, and packet
  • Zero dependencies: pure Python, nothing to install beyond the package itself
  • Terminal-aware: auto-fits diagrams to terminal width with progressive compaction
  • Rich and Textual integration: colored output and TUI widgets with optional extras
  • 6 color themes: default, terra, neon, mono, amber, phosphor
  • ASCII fallback: works on any terminal, even the most basic ones
  • Pipe-friendly CLI: cat diagram.mmd | termaid just works

Why?

Mermaid is great for documentation, but rendering it usually means spinning up a browser or calling an external service. termaid lets you render diagrams over SSH, in CI logs, inside TUI apps, or anywhere you have a Python environment. It was built because the existing tools in this space, like mermaid-ascii (Go) and beautiful-mermaid (TypeScript), don't offer a native Python library you can import and call directly.

Install

pip install termaid

Or try it without installing:

uvx termaid diagram.mmd

Quick start

CLI

termaid diagram.mmd
echo "graph LR; A-->B-->C" | termaid
termaid diagram.mmd --theme neon
termaid diagram.mmd --ascii

Python

from termaid import render

print(render("graph LR\n  A --> B --> C"))