Project
Ondine CLI
A native command-line front end for the Ondine Mermaid compiler.
Ondine CLI is the native command-line front end for the Ondine compiler. It renders Mermaid diagrams to SVG or ASCII, and transforms Mermaid fences in Markdown into inline SVG in a separate output tree. The package is ondine-cli; the installed binary is ondine.
Why§
The upstream Ondine toolchain runs through Node and npm. This front end keeps the same compiler and output but removes the Node startup and WebAssembly overhead: one native binary, no runtime, no network requests. It covers all 33 Ondine diagram types and fits into CI jobs, Makefiles, and static-site pipelines.
Advantages§
- Native: One Rust binary. No Node.js or WebAssembly runtime is needed.
- Fast: Avoids Node startup and WebAssembly compilation.
- Identical output: Uses the same Ondine compiler and produces the same SVG.
- Complete: All 33 Ondine diagram types.
- Markdown-aware: Transforms fenced Mermaid blocks without modifying the source files.
- Build-friendly: Fits CI jobs, Makefiles, and static-site pipelines.
Performance§
Native startup is a few milliseconds. The table compares ASCII output against ondine@0.0.3:
| Workload | Rust | npm | Ratio |
|---|---|---|---|
| 522 diagrams, per-type batches | 0.292 s | 9.041 s | 31x |
| 522 diagrams, one process | 0.136 s | 0.959 s | 7x |
| Per diagram, one process | 0.261 ms | 1.836 ms | 7x |
Scope§
This release renders SVG and ASCII, and transforms Markdown fences into a separate output tree. It does not edit Markdown in place, print terminal images, or produce JSON. --check verifies generated output. The compiler crate is pinned to a commit in wevm/ondine rather than a crates.io release, so compiler updates are deliberate.
Start with Quick Start, then read Markdown Fences for the full transformation behavior.
Credits§
This project exists because of Ondine, which ports Pele. It is independent and unofficial, and is not maintained by or affiliated with the Ondine project.
License§
MIT. See the license.