Wire Lang vs Mermaid
Wire Lang and Mermaid share a product shape: text goes in, a documentation-friendly diagram comes out, and the source lives in version control next to your code. The difference is what the text describes. Mermaid draws generic graphs — boxes and arrows. Wire Lang models a real electrical circuit — components with typed terminals joined by nets — and renders it as an electronic schematic.
Mermaid is the main product reference for Wire Lang's authoring and documentation workflow. Wire Lang is not a Mermaid plugin, does not depend on Mermaid, and does not aim for Mermaid syntax compatibility. Think "Mermaid, but for electronic schematics."
The same idea, a different domain
In Mermaid you connect nodes with edges; the meaning is whatever you intend. In Wire Lang you connect terminals through nets, and the meaning is electrical: a net is a shared electrical node, a terminal belongs to a known component type, and the renderer draws the correct schematic symbol for each part. Wire Lang validates that model — unknown components, unknown terminals, or a terminal wired to two different nets are real errors.
Side by side
| Mermaid | Wire Lang | |
|---|---|---|
| Domain | General diagrams (flowcharts, sequence, class, ER, …) | Electronic schematics |
| Primitives | Nodes and edges | Components, terminals, and nets |
| Semantics | Visual graph; meaning is up to the author | Electrical model; validated against a component library |
| Output | SVG diagram | Standalone, deterministic SVG schematic |
| Validation | Syntax-level | Syntax + electrical (unknown parts/terminals, net conflicts) |
| Authoring feedback | Parse errors | Structured diagnostics with codes, source ranges, and suggested fixes |
| Determinism | Layout may shift between versions | Stable auto-layout: same source → same diagram |
What the source looks like
A Mermaid flowchart of an LED circuit can only suggest the topology with boxes and arrows:
flowchart LR
BAT[Battery 5V] --> R[Resistor 220Ω]
R --> LED[LED red]
LED --> GND[Ground]
The equivalent Wire Lang source describes the actual circuit:
terminals (BT1.+, D1.A), nets
(VCC, GND), and component types the renderer
knows how to draw as schematic symbols:
schematic
component BT1 Battery voltage=5V
component R1 Resistor value=220ohm
component D1 LED color=red
net VCC: BT1.+, R1.1
connect R1.2, D1.A
net GND: D1.C, BT1.-
When to use which
Use Mermaid for flowcharts, sequence diagrams, and general architecture sketches. Use Wire Lang when the thing you are documenting is an electronic circuit and you want a proper schematic — with real components, electrical nets, and a diagram an engineer recognizes — that an AI assistant can also generate and review as plain text.
Scope note: Wire Lang is a schematic documentation renderer. It does not simulate circuits, lay out PCBs or breadboards, or produce a bill of materials. See the FAQ for what is in and out of scope.