Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

sirene

sirene is a local WYSIWYG editor and viewer for Mermaid, PlantUML, and Graphviz DOT diagrams, with SVG, PNG, and terminal ASCII output. It is one Rust binary, and renders offline without a browser, Node, or Java.

$ printf 'flowchart LR\n  A[Start] --> B{Ok?} -->|yes| C[Done]\n' | sirene ascii
┌───────┐    ╱─────╲       ┌──────┐
│ Start ├───►│ Ok? ├──yes─►│ Done │
└───────┘    ╲─────╱       └──────┘
  • sirene FILE opens an editor window: the source on the left, a live drawing on the right. Edits on either side are written to the source as ordinary text edits.
  • sirene svg, sirene png, and sirene ascii render a diagram file, a Markdown file’s diagram blocks, or stdin without opening a window, and can watch files for changes. svg and png also render directories of diagrams and watch for new files.
  • The parser keeps every byte of the source, so the editor never reformats a file. Diagnostics point at a line and column, and a diagram with errors is still drawn.

Diagrams

Mermaid:

Other Mermaid diagram types are reported as unsupported. See Supported syntax for what is read and how it differs from Mermaid.

PlantUML (@startuml and the other @start kinds): sequence, activity, class, object, state, use case, component, deployment, timing, network, mindmap, WBS, gantt, JSON, YAML, EBNF, regular expression, Chen ER, chronology, and file tree diagrams.

Graphviz DOT (digraph and graph): records, HTML table labels, clusters, and ports.

Start with Install and the Quickstart.