Software architecture diagrams
from simple text.

Orrery is a diagram language for creating component and sequence diagrams. Write text, get SVGs.

cargo install orrery-cli Get Started GitHub

See it in action

diagram sequence;

type Svc = Rectangle [fill_color="#e6f3ff"];

customer as "Customer": Oval;
shop as "Web Shop": Svc;
inventory: Svc;
payment: Svc;

customer -> shop: "Place order";
activate shop {
    shop -> inventory: "Check stock";
    alt "In stock" {
        inventory -> shop: "Reserved";
        shop -> payment: "Charge";
        payment -> shop: "Confirmed";
        note [on=[shop]]: "Send confirmation email";
        shop -> customer: "Order placed";
    } else "Sold out" {
        inventory -> shop: "Unavailable";
        shop -> customer: "Out of stock";
    };
};
Rendered sequence diagram showing an order flow with conditional branching and activation blocks
diagram component;

type Svc = Rectangle [fill_color="#e6f3ff", rounded=5];
type Store = Rectangle [fill_color="#e0f0e0", rounded=5];

user as "User": Actor;

frontend: Component [fill_color="#fff8f0"] {
    app as "Web App": Svc;
    admin as "Admin Panel": Svc;
};

backend: Component [fill_color="#f0f5ff"] {
    api as "API Server": Svc;
    auth as "Auth": Svc;
    api -> auth;
};

db as "PostgreSQL": Store;

user -> frontend;
frontend -> backend;
backend -> db;
Rendered component diagram showing an Actor, UML Component containers with nested services, and a database
diagram component;

type Svc = Rectangle [fill_color="#e6f3ff", rounded=5];

processor as "Payment Processor": Svc
    embed diagram sequence {
    validator: Rectangle [fill_color="#fff3e0"];
    ledger: Rectangle [fill_color="#e0f0e0"];
    notifier: Rectangle [fill_color="#f0e6ff"];

    validator -> ledger: "Debit";
    critical "Transaction" {
        ledger -> notifier: "Record";
        notifier -> ledger: "Ack";
    };
    ledger -> validator: "Result";
};

merchant as "Merchant API": Svc;
bank as "Bank Ledger": Rectangle [fill_color="#e0f0e0"];

merchant -> processor: "Charge $42.00";
processor -> bank: "Settle";
bank -> [stroke=[style="dashed"]] merchant: "Confirmation";
Rendered embedded diagram showing a payment processor component with an internal sequence diagram featuring a critical section and self-message

Why Orrery?

Feels like code

Orrery reads like the code you already write. The syntax feels natural, not foreign.

A real type system

Define types, extend them, override what you need. Your diagrams stay DRY just like your code.

Learn it once

Switching between diagram types doesn't mean relearning the syntax. The same knowledge transfers.

Zoom into any component

Embed a full diagram inside a component to show its internal behavior — without leaving the diagram.

The compiler has your back

Rust-inspired error messages tell you exactly what's wrong and where. No guessing, no cryptic errors.

Simple things are simple, complex things are possible

Start with the basics. When you need more control, it's there — no ceiling, no workarounds.