@foxalope/mermaid-render
v0.1.1
Published
Render beautiful Mermaid diagrams to PNG from the command line
Maintainers
Readme
mermaid-render
Render beautiful Mermaid diagrams to PNG from the command line.
A native Rust CLI tool with modern styling using the Flat UI color palette.
Installation
npm install -g mermaid-renderUsage
# Basic usage
mermaid-render -i diagram.mmd -o output.png
# With dark theme
mermaid-render -i diagram.mmd -o output.png --theme dark
# With 2x scale (for retina displays)
mermaid-render -i diagram.mmd -o output.png --scale 2
# Show help
mermaid-render --helpSupported Diagram Types
Flowcharts
graph TD
A[Start] --> B{Decision}
B -->|Yes| C[Action]
B -->|No| D[End]Supported node shapes:
[text]- Rectangle(text)- Rounded rectangle{text}- Diamond((text))- Circle([text])- Stadium[(text)]- Cylinder
Directions: TD, TB, BT, LR, RL
Sequence Diagrams
sequenceDiagram
Alice->>Bob: Hello
Bob-->>Alice: Hi thereThemes
default- Light theme with Flat UI colorsdark- Dark theme for dark backgrounds
Features
- Native Rust performance (no browser/Node.js runtime needed)
- Beautiful modern styling with rounded corners and shadows
- Anti-aliased rendering
- Embedded Open Sans font
- Support for flowcharts and sequence diagrams
License
MIT
