Plain-text schematics that merge object by object
Two or three sentences: a schematic file that git can merge is rare, and why the author wanted one. The author writes this.
What is in a .shcomp
A Schemify design is plain text. This is a whole cell: a buffer built from two instances of an inverter sub-cell.
schemify 1 shcomp doc "Two-inverter buffer: an inverter cell used as a hierarchical sub-cell" pin IN in -40 0 pin OUT out 40 0 impl sch schematic inst x00001 ./inv at 0 0 R0 name x1 wire w00001 40 0 100 0
Drawn out, the cell is two inverters in series:
There are three kinds of file:
| Kind | Holds | Example |
|---|---|---|
.shprim | a symbol and its device definition (SPICE, Verilog-A or Verilog) | a PDK transistor |
.shcomp | a symbol, its schematic and a docs page | an OTA, an inverter |
.shbench | a schematic, a docs page, the simulation setup and SPICE code | a testbench, the only kind you can run |
One line per object
Explain the stable ids (x00001, w00001) and the sort order, and why moving a part changes exactly one line. Show the diff below in context.
inst x00001 ./inv - at 0 0 R0 + at 40 0 R0 name x1
The merge driver
# register the merge driver in this clone schemify git-setup # object-level diff of two design files schemify diff a.shcomp b.shcomp
Every command follows the same exit-code convention,1 so the driver fits into scripts and CI.
Walk through a real conflict: both branches touching the same object, and what the driver reports.
Canonical form
schemify fmt rewrites files in canonical form, and schemify fmt --check fails if a file is not, which is a cheap CI gate.
Say why a canonical form matters for diffs, and what it normalises.
Why opening a file runs nothing
Designs are pure data. Simulator commands live in your own config and in plugins, never in a file someone sent you.2
The author’s view on why this matters when designs move between teams and companies.
The CLI exits 0 on success, 1 on design errors and 2 on usage or I/O errors, so scripts can tell them apart. From the command-line reference in the Schemify README. ↩︎
Plugins run sandboxed with the permissions you grant, so a plugin cannot spawn a simulator unless you allowed it, for example with
spawn:ngspicein yourinit.lua. ↩︎