Turn a generic, hierarchical netlist (JSON) into a KiCad schematic.
schematizer does the graphical half of EDA: it takes a tool-neutral netlist
document and does all the drawing work — component placement, wire routing, and
writing .kicad_sch files for a selected KiCad version (5–10). It is not tied
to any particular front end: any tool that emits the netlist format can use
it. SKiDL is the first such producer —
SKiDL describes electrical interconnection in code and hands the netlist to
schematizer — but the input is just JSON, so other generators work too.
The netlist document (produced by
skidl.schematic_netlist.build_generic_netlist, or any equivalent emitter)
embeds each component's symbol definition and carries layout hints —
component mirror/rotate (symtx) and net stubbing (stub/netio). Because
symbols are embedded, this tool needs no access to KiCad symbol libraries.
pip install schematizer# netlist.json -> KiCad 9 schematic files in ./out/
schematizer netlist.json --tool kicad9 -o out --top-name mydesignimport json
from schematizer import render
with open("netlist.json") as f:
netlist = json.load(f)
render(netlist, tool="kicad9", filepath="out", top_name="mydesign")render() also accepts a path to the JSON file directly.
To the SKiDL end user nothing changes: Circuit.generate_schematic() builds
the generic netlist internally and calls render() here. Because the seam is a
plain JSON document, schematizer can be iterated and improved independently of
SKiDL — and reused by any other front end that emits the same format.
Self-contained. The placement/routing/writer engine is vendored under
schematizer/engine, and the netlist is reconstructed into a lightweight
intermediate representation (schematizer.ir: SchPart/SchPin/SchNet) that
the engine consumes directly — no .kicad_sym re-parse, no KiCad library
access, and no runtime dependency on skidl. The only runtime dependency is
simp_sexp. The KiCad power-symbol library (for GND/rail nets) is vendored in
schematizer/data.
--tool accepts kicad6 … kicad10, which share one modern S-expression
writer (with a couple of KiCad-8 format toggles).
KiCad 5 is not supported and is rejected with an explanatory error. It
needs the legacy EESCHEMA .sch format rather than .kicad_sch, and KiCad 5
libraries describe symbols in a different, non-s-expression form that the
generic netlist does not carry.