1 unstable release
Uses new Rust 2024
| new 0.1.0 | May 8, 2026 |
|---|
#2231 in Text processing
120KB
3.5K
SLoC
console-mermaid
Render Mermaid diagrams as ASCII/Unicode in the terminal.
This is a Rust port of the original Go mermaid-ascii project by AlexanderGrooff, and focuses on producing readable, deterministic console output for flowcharts and sequence diagrams.
Features
- Renders Mermaid flowcharts and sequence diagrams to text
- Supports Unicode box drawing or ASCII-only output
- Adjustable box and node spacing
- Reads from a file or stdin
Install
Build locally:
cargo build --release
Run directly:
cargo run -- --help
Install globally with Cargo:
cargo install --git https://github.com/AlextheYounga/console-mermaid.git
Make sure Cargo's bin directory is on your PATH (usually ~/.cargo/bin).
Usage
# From a file
cargo run -- path/to/diagram.mmd
# From stdin
cat path/to/diagram.mmd | cargo run -- -
Common options
--asciiuse ASCII-only characters--coordsshow layout coordinates (debug)--box-padding <n>box padding inside nodes--padding-x <n>horizontal spacing between nodes--padding-y <n>vertical spacing between nodes--graph-direction <LR|TD>override graph direction
Example
flowchart TD
A["Start"] --> B["End"]
cargo run -- --ascii - <<'EOF'
flowchart TD
A["Start"] --> B["End"]
EOF
Credits
This project is a Rust port of the original Go implementation by AlexanderGrooff: https://github.com/AlexanderGrooff/mermaid-ascii
Dependencies
~5–7MB
~115K SLoC