Contents

Usage

The package is ondine-cli; the installed binary is ondine. This page covers both render modes and the Markdown transformer.

Render diagrams§

Render a .mmd or .mermaid file beside its source:

ondine flow.mmd

Render every SVG into one directory:

ondine diagrams/*.mmd --out-dir public/diagrams

Render standard input to standard output:

cat flow.mmd | ondine > flow.svg

Print diagrams as ASCII text:

ondine --ascii flow.mmd

With multiple files, ASCII output is concatenated in argument order. --out-dir is ignored in ASCII mode.

Render options§

OptionMeaning
-a, --asciiPrint diagrams as ASCII text instead of writing SVG files.
-o, --out-dir <DIR>Write every rendered SVG into one directory.
-h, --helpPrint usage.
-V, --versionPrint the version.

Files named .mmd or .mermaid replace that suffix with .svg. Other names keep their extension, so flow.txt becomes flow.txt.svg.

Transform Markdown fences§

Transform a Markdown tree into a separate output tree:

ondine markdown content --out-dir build/content

The source files are not modified. Directory inputs mirror their relative paths under the output directory.

Check that generated Markdown is current:

ondine markdown content --out-dir build/content --check

Write one transformed file to standard output:

ondine markdown page.md --stdout

--check writes nothing and exits with status 1 when output is missing or stale. It requires an existing --out-dir. --stdout accepts exactly one Markdown file.

Markdown options§

OptionMeaning
-o, --out-dir <DIR>Write transformed Markdown to a separate tree.
--checkWrite nothing, and exit with 1 when output is missing or out of date.
--stdoutWrite one transformed Markdown file to standard output.
-h, --helpPrint usage.

Unlike render --out-dir, which collects SVG files into one directory, Markdown --out-dir preserves the input directory structure.

Only fences tagged mermaid are transformed. See Markdown Fences for fence syntax, output shape, and accessibility. See Output and Errors for diagnostics and exit behavior.