mermaid-ast
v0.8.2
Published
Parse and render Mermaid diagrams to/from AST
Downloads
2,512
Maintainers
Readme
Mermaid Tools Monorepo
This repository contains tools for working with Mermaid diagrams.
Packages
| Package | Description | npm | JSR |
|---------|-------------|-----|-----|
| mermaid-ast | Parse and render Mermaid diagrams to/from AST | |
|
| mermaid-svg | Render Mermaid diagrams to SVG | - | - |
mermaid-ast
Parses all 18 diagram types supported by mermaid.js and renders them back to text.
Features:
- Full round-trip fidelity:
render(parse(text))produces semantically equivalent diagrams - Wrapper classes for programmatic diagram manipulation
- Works in Bun, Node.js, and Deno
See the mermaid-ast README for full documentation, API reference, and examples.
Development
# Install dependencies
bun install
# Run all tests
just test
# See all available commands
justReleasing
IMPORTANT: Follow the release procedure exactly. Do not release manually.
See .agents/procedures/release.md for the complete release procedure.
License
MIT
