Wire Lang documentation
Wire Lang is a text-first language for electronic schematics. You
describe a circuit as components, terminals, and nets in a small
declarative .wire file, and Wire Lang renders it as a
clean, documentation-ready SVG. The same source always produces the
same diagram.
Code is text, so AI can read it, write it, and refactor it. Diagrams followed with text formats like Mermaid. Electronic schematics never made that jump and stayed locked inside GUI editors that AI cannot read. Wire Lang is the missing layer between AI and the circuit board: schematics become something an engineer or an assistant can generate, review, and improve as plain text.
Wire Lang is a documentation-oriented schematic renderer. It models a real electrical circuit — components with typed terminals joined by nets — rather than flowchart boxes and arrows. It is not a simulator, a PCB layout tool, a breadboard tool, or a BOM manager.
The shortest example
A 5 V battery drives a red LED through a 220 ohm current-limiting resistor. This is a complete, valid Wire Lang document:
schematic
title "LED current limiting circuit"
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.-
annotation "Current limiting resistor" near R1
Start here
Getting started
Install Wire Lang, write your first .wire file, and render it from the CLI or JavaScript.
Syntax reference
Every statement: components, nets, connect, annotations, render hints, and the standard component library.
CLI usage
The wire check, wire render, and wire watch commands, JSON output, and exit codes.
Examples
Copy-pasteable .wire sources with their rendered SVG output.
Wire Lang vs Mermaid
How a text-first schematic language differs from a text-first diagram tool.
FAQ
What Wire Lang is, what it is not, and how it fits an AI authoring workflow.
Install
npm install wire-lang
Wire Lang is published on npm as wire-lang and is open source under the MIT license on GitHub. Packages are ESM-only and target Node.js 20 or newer.