Table of Contents
This guide will help you create your first diagram with Sirena in 5 minutes.
Prerequisites
Ensure Sirena is installed. If not, see the Installation Guide.
Your First Diagram
Programmatic Usage
Use Sirena in your Ruby code:
require 'sirena'
# Render from a string
mermaid_code = <<~MERMAID
graph TD
A --> B
MERMAID
svg = Sirena::Engine.render(mermaid_code)
File.write('output.svg', svg)
# Render from a file
svg = Sirena::Engine.render_file('diagram.mmd')
Batch Processing
Render multiple diagrams at once:
sirena batch diagrams/ -o output/
This renders all .mmd files in diagrams/ directory to SVG files in output/.
Next Steps
-
CLI Reference - Learn all available commands and options
-
Diagram Types Reference - Explore all 24 diagram types
-
Examples - Browse 37+ working examples