Agentic Mermaid

The am CLI wraps the library for local rendering, verification, and batch checks. In the cloned repo, am is bun run bin/am.ts.

am verify diagram.mmd                # structural + geometric + lint warnings
am verify diagram.mmd --json         # machine-readable for agents
am render diagram.mmd --format svg --output diagram.svg
am render diagram.mmd --format png --output diagram.png
am render diagram.mmd --format ascii # or --format unicode

Prefer --json in agent loops so you can branch on verify.ok and the stable warning codes instead of parsing prose.


Docs index