Orrery

v0.12.2
io.github.Sagargupta16/orrery Checked 2 hours ago Published 29 days ago

Architecture diagrams with official AWS, Azure, GCP and Kubernetes icons, to SVG, PNG and draw.io

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_authoring_guide Authoring guide

Read this before writing a spec. topic diagram (default) returns the orrery skill (fast path, authoring rules, outputs) and the full spec reference; topic review returns the review loop and the patch ops try_patches takes.

ParameterTypeDescription
topicstring

validate Validate a spec

Check a spec without rendering: parse errors, unknown icons (with the closest ids), bad references and layout warnings, each with a code, a message and concrete fixes. Returns JSON with ok, the counts, the diagnostics and the diagram's size.

ParameterTypeDescription
namestringFile name stem for outputs: lowercase letters, digits and -. Default: the spec file's name, else diagram.
specstringThe diagram spec as YAML (or JSON) text. Pass this or spec_path, not both.
spec_pathstringAbsolute path of a spec file on this machine (stdio only). Its folder resolves relative icons: paths.

render Render a diagram

Render a spec to SVG, PNG, draw.io, editable draw.io SVG, a React TSX component or a standalone HTML page. Nothing renders while the spec has errors (see the diagnostics). With out_dir (stdio only) the files are written there and their paths returned; otherwise the result carries a JSON receipt, then each output in order: PNGs as images, the others as text.

ParameterTypeDescription
animatestringSVG motion: packets, flow, relay or none. Default: the skin's (packets for classic, relay for stage). PNG is always still.
formatsarrayDefault: svg and png.
namestringFile name stem for outputs: lowercase letters, digits and -. Default: the spec file's name, else diagram.
out_dirstringAbsolute folder to write the files to (stdio only). Existing files are replaced.
scalenumberPNG pixels per diagram unit. Default 3 with out_dir, 2 inline.
skinstringclassic (vendor deck look) or stage (dark product look). Default: the spec's skin.
specstringThe diagram spec as YAML (or JSON) text. Pass this or spec_path, not both.
spec_pathstringAbsolute path of a spec file on this machine (stdio only). Its folder resolves relative icons: paths.
themestringboth renders a light and a dark file. Default: the spec's theme.

review Review a diagram

Measure the diagram at the width readers see it (a README column is 880 px): six scored dimensions (conventions, layout, grid, flow, overlap, quality), hard counts, findings with evidence and spec fixes, and pass (no blocker or major and score >= 85). Returns the report JSON and the PNG exactly as the reader sees it. A failing review is a normal result: fix the spec, or try fixes with try_patches.

ParameterTypeDescription
namestringFile name stem for outputs: lowercase letters, digits and -. Default: the spec file's name, else diagram.
skinstringclassic (vendor deck look) or stage (dark product look). Default: the spec's skin.
specstringThe diagram spec as YAML (or JSON) text. Pass this or spec_path, not both.
spec_pathstringAbsolute path of a spec file on this machine (stdio only). Its folder resolves relative icons: paths.
themestringDefault: the spec's theme.
widthintegerDisplay width in CSS px. Default 880.

describe Describe a diagram

Lay the spec out and tell what the picture shows in plain text: the title, each group and the nodes in it, each node's place in reading order (row from the top, then from the left) and its edges with their labels, and the numbered steps. Use it to check the drawing says what you meant without looking at an image, or as alt text. format json returns the same as data. A spec with errors returns its diagnostics instead.

ParameterTypeDescription
formatstringDefault: text.
namestringFile name stem for outputs: lowercase letters, digits and -. Default: the spec file's name, else diagram.
specstringThe diagram spec as YAML (or JSON) text. Pass this or spec_path, not both.
spec_pathstringAbsolute path of a spec file on this machine (stdio only). Its folder resolves relative icons: paths.

list_templates List templates

The bundled reference diagrams (AWS, Azure, Google Cloud, Kubernetes, C4, system design, flowcharts, BPMN, state machines, journeys), each with its title. Start from the closest one with get_template.

get_template Get a template

One bundled template's spec YAML (names from list_templates; starter is the general one). Edit it and pass it to validate, render or review as spec.

ParameterTypeDescription
name *stringA name from list_templates.

try_patches Try spec patches

Review each candidate (a list of patch ops) on its own copy of the spec and keep only those that raise the score without raising any hard count or adding a blocker or major finding. Ops: {op: set, path, value}, {op: unset, path}, {op: add, path, value}, {op: move, path, after|before}, {op: edge, match: a spec edge line or null to append, value: the new line or null to remove}; paths are dotted, for example nodes.db.note. Returns each candidate's score and verdict, then the best patched spec text when one was kept.

ParameterTypeDescription
candidates *arrayCandidate fixes, each a list of patch ops applied in order.
namestringFile name stem for outputs: lowercase letters, digits and -. Default: the spec file's name, else diagram.
skinstringclassic (vendor deck look) or stage (dark product look). Default: the spec's skin.
specstringThe diagram spec as YAML (or JSON) text. Pass this or spec_path, not both.
spec_pathstringAbsolute path of a spec file on this machine (stdio only). Its folder resolves relative icons: paths.
themestringDefault: the spec's theme.
widthintegerDisplay width in CSS px. Default 880.