
Basalt is a small declarative language for network, OT and cloud architecture. You write zones, devices and the conduits between them in plain text — Basalt turns it into a living, versionable diagram of your architecture.
zone "Enterprise Network" [level: 4-5, color: blue] { ERP System [icon: sap-erp] Corporate Firewall [icon: cisco-fw]}zone "Industrial DMZ" [level: dmz, color: orange] { Historian Mirror [icon: historian]}zone "Control Network" [level: 2-3, color: purple] { SCADA Server [icon: scada]} Corporate Firewall > DMZ Firewall [firewall, conduit: HTTPS:443]SCADA Server > Main PLC [conduit: EtherNet/IP:44818]A zone is the top-level container of a Basalt file — a network segment, a security tier, a cloud account. Everything you declare lives inside one, and Basalt renders each zone as a distinct region with its own color and border. Add [level:] for the Purdue hierarchy — 0 is the physical process, 5 is the enterprise.
// a zone per trust boundaryzone "Enterprise Network" [level: 4-5, color: blue] { ERP System [icon: sap-erp] Corporate Firewall [icon: cisco-fw]} zone "Industrial DMZ" [level: dmz, color: orange] { Historian Mirror [icon: historian]}
A cell is a process area inside a zone — an assembly line, a plant subsystem. Where zones are network tiers, cells group what’s physically together: a local controller plus the sensors and actuators around it.
zone "Field Network" [level: 1, color: green] { Main PLC [icon: allen-bradley] cell "Assembly Line" { Assembly PLC [icon: plc] Assembly Robot Controller [icon: robot-controller] Assembly Sensors [icon: sensor] }}
An edge is a directed connection between two nodes — a call, a stream, a control link. Direction is part of the syntax: source > target, and the arrowhead lands on the target. Edges cross zones freely — that top-to-bottom flow is the whole point of a correct diagram.

Corporate Firewall > DMZ Firewall [firewall, conduit: HTTPS:443]DMZ Firewall > SCADA Server [firewall, conduit: OPC-UA:4840]SCADA Server > Main PLC [conduit: EtherNet/IP:44818] // fan-out: one source, many targetsAssembly PLC > Assembly Sensors, Assembly Actuators [conduit: PROFINET]Services, databases, PLCs, sensors, people — a node is anything worth a box on the map. Declare it inside a zone with a name and an icon. The name is both the label you see and the identifier edges reference.
zone "Control Network" [level: 2-3, color: purple] { SCADA Server [icon: scada] HMI Station [icon: hmi] Engineering Workstation [icon: workstation] Plant Historian [icon: osisoft-pi]}SCADA Server > Main PLC reads exactly like the boxes it connects. Unresolved icon slugs render as a visible subtitle, so a typo shows on the canvas instead of failing silently.
Basalt ships a built-in library of 1,900+ icons — AWS, Azure, GCP, Cisco, PLC and SCADA vendors, plus industrial, hardware and security glyphs. Search by keyword and drop one in with [icon: slug].
ERP System [icon: sap-erp]Corporate Firewall [icon: cisco-fw]SCADA Server [icon: scada]Main PLC [icon: allen-bradley]Plant Historian [icon: osisoft-pi]Azure IoT Hub [icon: iot-hub]Change the code and the canvas updates. Drag a node, rename a device, draw or delete an edge — it writes straight back to the code. Most diagram-as-code tools render one way; Basalt is a true round trip.