Diaview is a terminal-native diagram renderer for Mermaid flowcharts. It parses a supported Mermaid flowchart subset, lays it out in Rust, and renders it with Ratatui.
Supported today:
graph TDgraph TBnormalized to top-downgraph LRflowchart TDflowchart LR- rectangle nodes:
A[text] - rounded nodes:
A(text) - diamond nodes:
A{text} - circle nodes:
A((text)) - database/cylinder nodes:
A[(text)] - bare node refs:
A - solid arrows:
--> - solid links without arrows:
--- - dashed arrows:
-.-> - dashed links without arrows:
-.- - thick arrows:
==> - edge labels:
-->|text|and-- text --> subgraphblocks with ids, labels, and membership- whole-line comments starting with
%% - semicolon-separated statements
Not supported yet:
- interactive editing or selection
- agent / Visual REPL features
- class/style declarations
- non-flowchart Mermaid diagram types
- Graphviz / dagre-backed layout
- general-purpose Mermaid syntax coverage
Render fullscreen from a file:
cargo run -- fixtures/simple.mmdRender inline from a file:
cargo run -- --inline fixtures/simple.mmdRender inline from stdin:
cat fixtures/simple.mmd | cargo run -- --inlineDiaview is dual-licensed under either MIT or Apache-2.0.
Diaview requires Nerd Fonts v3 glyph support.
Use a patched Nerd Font, or install Symbols Nerd Font Mono as a terminal fallback.
On macOS with Homebrew:
brew install --cask font-symbols-only-nerd-fontcargo fmt --check
cargo check
cargo test
cargo run -- --inline fixtures/complex_architecture.mmd- terminal-native rendering only
- no fullscreen interaction yet
- no hidden layout engine dependency
- no raster / Kitty graphics output
- parser and layout support are intentionally narrow
docs/README.mddocs/architecture.mddocs/development.mddocs/parser.mddocs/layout.mddocs/rendering.mddocs/testing.mddocs/roadmap.md