kicad monkey v2026.11.30
On This Page (6)

CLI: Fabrication, vdoc, BOM/PnP & Micro-STEP

These kcr and native Rust k3 commands lower KiCad boards, projects, schematics, and footprint libraries through the shared FabView pipeline. Use them to produce Gerber/drill/IPC-2581B releases, baked KiCad vdoc layers, BOM/PnP/JLCPCB tables, and pure-Python/Rust Micro-STEP alignment models from one consistent geometry model.

Commands At A Glance

CommandConfig FilePurposePrimary Inputs
kcr fab (gerbz, ipc2581)fab.jsoncAnalytic Gerber X2/X1, Excellon NC drill, IPC-2581B, virtual fab layers, PnP/BOM CSV, Micro-STEP, and opt-in --bake.kicad_pcb, .kicad_pro
kcr vdoc (virtual-doc)<stem>.vdoc.jsonc / vdoc.jsoncSafe doc-layer cleanup + baking of the 17 virtual layers into native KiCad graphics.kicad_pcb, .kicad_pro, .kicad_mod, .pretty
kcr bom./bom.config (CWD)Multi-output grouped/raw BOM (JSON, CSV, formatted XLSX) with variants & DNP controls.kicad_pro, .kicad_sch, .kicad_pcb
kcr pnp./bom.config (CWD)Pick-and-Place centroid tables (CSV, JSON, XLSX, jlc-cpl) in mm or mils.kicad_pro, .kicad_pcb
kcr jlc./bom.config (CWD)JLCPCB BOM + CPL workbooks (strictly mm) with missing-LCSC terminal audit table.kicad_pro, .kicad_pcb
kcr pcb-layer-steppcb-layer-step.jsoncColored, instanced ISO 10303-21 Micro-STEP fixture-alignment models (zero Geometer/OCCT).kicad_pcb, .kicad_pro

kcr fab (gerbz, ipc2581)

Generates analytic fabrication deliverables from KiCadFabView (Python) or FabViewData (native Rust k3) driven by fab.jsonc (kicad_cruncher.fab_config.a0):

sh
kcr fab --init-config --config fab.jsonc
kcr fab board.kicad_pcb -o output/fab
kcr gerbz board.kicad_pcb --virtual-layers CUTOUTS,PIN1_TOP,DIODES_TOP -o output/gerbers
kcr ipc2581 board.kicad_pcb -o output/ipc2581

See kcr fab for the complete annotated fab.jsonc schema, alias precedence, --gerbers/--no-gerbers rules, and .GM1 extension collision guards.

kcr vdoc (virtual-doc)

Cleans legacy documentation-layer artwork using the shared kcr pcb clean engine (removing legacy F.Fab/B.Fab/User.* graphics and hiding visible Reference/Value fields without ever deleting mandatory fields, pads, 3D models, copper, Edge.Cuts, silkscreen, mask, paste, or *.CrtYd courtyards) and bakes any subset of the 17 virtual fab layers into native KiCad graphics grouped under Virtual_<LAYER_KEY> with readable User.N display names.

Three built-in layout presets (layer_preset in vdoc.jsonc or --preset on CLI):

sh
kcr vdoc --init-config --config vdoc.jsonc
kcr vdoc board.kicad_pcb --dry-run
kcr vdoc board.kicad_pcb -o baked.kicad_pcb
kcr vdoc board.kicad_pcb --preset fab-outlines -o baked.kicad_pcb
kcr vdoc MyParts.pretty -o MyParts_vdoc.pretty
kcr vdoc MyParts.pretty --fab-only -o MyParts_fab.pretty
kcr vdoc board.kicad_pcb --clean-only
kcr vdoc board.kicad_pcb --clear-only

See kcr vdoc for board-vs-footprint auto-detection, config discovery, --map precedence, snapshot-before-clean safety ordering, and collision guards.

kcr bom, kcr pnp, and kcr jlc (bom.config)

All three assembly commands share one commented JSONC configuration schema (kicad_cruncher.bom.config.a0), discovered at ./bom.config in the current working directory (or via --config <path>):

sh
kcr bom --write-config bom.config
kcr bom project.kicad_pro -o output
kcr pnp project.kicad_pro --units mm -o output
kcr jlc project.kicad_pro --all-variants -o output

See kcr bom, kcr pnp, and kcr jlc for the full bom.config template and conflict rules.

kcr pcb-layer-step

Both Python kcr pcb-layer-step and native Rust k3 pcb-layer-step emit self-contained ISO 10303-21 Micro-STEP alignment models directly from FabView with zero Geometer or OpenCASCADE dependency:

sh
kcr pcb-layer-step --init-config --config pcb-layer-step.jsonc
kcr pcb-layer-step board.kicad_pcb --layer F.Cu -o output/step
k3 pcb-layer-step board.kicad_pcb --layer F.Cu -o output/step

See kcr pcb-layer-step for the full pcb-layer-step.jsonc schema, option merge ladder, and drill-color cascade.

kicad-monkey v2026.11.30·Docs updated 2026.12.01 15:43 UTC (fd9b75b)