Merman CLI Latias94
Install Merman CLI with WinGet
winget install --id=Latias94.MermanCLI -e Merman CLI parses, lays out, analyzes, and renders Mermaid diagrams in a headless native process.
winget install --id=Latias94.MermanCLI -e Merman CLI parses, lays out, analyzes, and renders Mermaid diagrams in a headless native process.
Mermaid diagrams, rendered in Rust.
Parse, lay out, and render Mermaid diagrams for documentation, editor previews, reports, and applications. Merman runs headlessly: its native rendering path needs no browser or JavaScript runtime. Use it as a Rust library, a CLI, or through browser and native bindings.
Merman targets Mermaid 12.3.0 syntax, behavior, and SVG structure. Rendering uses Mermaid's themes by default; custom Merman themes are optional.
Try the Playground · Quick start · Ecosystem · Documentation
Rendered by Merman with Mermaid's default theme on a white canvas. Source · SVG-text configuration
> Used by Zed. Zed uses Merman as its Rust Mermaid backend. > Read the merged integration.
The examples below use 0.10.0. For release selection and prebuilt downloads, start
with the host installation guide.
With Rust 1.95 or later, add Merman to your Cargo.toml:
[dependencies]
merman = "0.10.0"
Save this as src/main.rs:
use merman::{OperationControl, RenderOutput, RenderRequest, Renderer, SvgRequest};
fn main() -> Result<(), Box> {
let output = Renderer::new().render(RenderRequest::svg(
"flowchart LR\n Source[Mermaid source] --> Merman --> Svg[SVG string]",
OperationControl::new(),
SvgRequest::default(),
))?;
let RenderOutput::Svg(Some(svg)) = output else {
return Err("no Mermaid diagram detected".into());
};
print!("{}", svg.svg());
Ok(())
}
cargo run --quiet > diagram.svg
See the Rust embedding guide and runnable examples for configuration, repeated rendering, and host integration.
Install from Cargo and render a first diagram:
cargo install merman-cli --version 0.10.0 --locked
printf 'flowchart LR\n Source --> Merman --> SVG\n' | merman-cli render - --output diagram.svg
For an existing file, run merman-cli render diagram.mmd --output diagram.svg.
The CLI guide also covers prebuilt installation, PNG/JPEG/PDF export, Markdown batches,
linting, and ASCII/Unicode output for supported families.
Choose the host where your application runs. Each guide owns its installation steps and available operations; the host guide records release availability across channels.
| Use Merman in | Start here |
|---|---|
| Rust applications | merman API · Embedding guide |
| Shell scripts and CI | CLI · GitHub Actions setup |
| JavaScript applications | Native Node.js (experimental) · Node-WASM · Browsers and Workers |
| Native and mobile applications | C/C++ and WASI SDK · Python · Swift · Android · Flutter/Dart |
| Editors and language tools | LSP · VS Code · Tree-sitter grammar |
| Documentation systems | Rustdoc · Typst |
Beyond SVG, Merman offers typed diagram models, diagnostics, editor APIs, image/PDF export, and terminal output. Start with the capability guide for feature selection or the package surface guide for the complete product map.
Built-in presets such as Brutalist, Ghibli, Paper Cut, Carbon Copy, and Pop Art are selected by their runtime preset IDs. The Playground theme designs include editable recipes and coordinated light/dark designs. Browse by diagram type and style, then use a preset or copy a recipe through Rust, CLI, Web, Node, or Typst.
Explore custom themes
<a href="https://frankorz.com/merman/?theme-design=riso"><img src="https://raw.githubusercontent.com/Latias94/merman/main/playground/src/themes/previews/riso-flowchart.svg" width="100%" alt="Riso Flowchart: a review workflow in blue and red ink on a cream canvas" /></a>
<a href="https://frankorz.com/merman/?theme-design=riso"><strong>Riso · Flowchart</strong></a>
<a href="https://frankorz.com/merman/?theme-design=carbon-copy"><img src="https://raw.githubusercontent.com/Latias94/merman/main/playground/src/themes/previews/carbon-copy-sequence.svg" width="100%" alt="Carbon Copy Sequence: typewritten exchanges on ruled paper with violet offset impressions and red review notes" /></a>
<a href="https://frankorz.com/merman/?theme-design=carbon-copy"><strong>Carbon Copy · Sequence</strong></a>
<a href="https://frankorz.com/merman/?theme-design=pop-art"><img src="https://raw.githubusercontent.com/Latias94/merman/main/playground/src/themes/previews/pop-art-xychart.svg" width="100%" alt="Pop Art XY Chart: quarterly deliveries shown with yellow bars, a pink line, and black outlines" /></a>
<a href="https://frankorz.com/merman/?theme-design=pop-art"><strong>Pop Art · XY Chart</strong></a>
<a href="https://frankorz.com/merman/?theme-design=atlas"><img src="https://raw.githubusercontent.com/Latias94/merman/main/playground/src/themes/previews/atlas-pie.svg" width="100%" alt="Atlas Pie: work by stage, with percentage labels and a legend in a restrained pastel palette" /></a>
<a href="https://frankorz.com/merman/?theme-design=atlas"><strong>Atlas · Pie</strong></a>
Actual Merman SVG exports from the Playground's standalone JSON theme library. Open a design for its diagram gallery, sources, editable recipe, and integration examples.
The theme guide covers adopting and customizing recipes, family scope, and output support. The preset gallery shows more real renders and includes design credits.
Merman follows pinned Mermaid source, with checks for parsing, layout, configuration, themes, and SVG structure. Browse the alignment dashboard for diagram-family coverage and comparison evidence, from Flowchart and Sequence to Class, ER, State, Gantt, Mindmap, and charts.
Text measurement, host fonts, HTML labels, and hand-drawn paths can differ from browser output. The SVG output guide explains the output pipelines and viewer requirements. Performance methodology, workloads, and reproducible commands live in the benchmark guide.
The documentation index routes to maintained guides for integration, architecture, and development. See resource policy for cancellation and bounded host workloads, rendering security for safe embedding, and the contributor and CI guide for local checks. Use the changelog and release and upgrade index when moving between releases.
Merman's own code is available under the Apache License 2.0 or MIT License. Distributed components retain their own licenses and notices, including EPL-2.0 ELK in default Rust rendering features. See THIRD_PARTY_NOTICES.md for the feature-dependent requirements.
Merman is independent of, and not affiliated with, endorsed by, or sponsored by the Mermaid project or its maintainers.