CLI command design
jlc
Generates the paired JLCPCB manufacturing upload files from one KiCad project or PCB input by reusing the BOM/PnP normalization and config layer.
Usage
kicad-cruncher jlc project.kicad_pro
kicad-cruncher jlc project.kicad_pro --variant B4
kicad-cruncher jlc project.kicad_pro --all-variants
kicad-cruncher jlc project.kicad_pro --position-mode component-center
kicad-cruncher jlc project.kicad_pro --config bom.config
kicad-cruncher jlc --write-config bom.configArguments
file is a .kicad_pro or .kicad_pcb. --variant and --all-variants select variant processing. --config loads the shared BOM/PnP JSON or JSONC config. --write-config writes the documented default JSONC config. --units defaults to config units but JLC CPL requires mm. --position-mode defaults to component-center, the only KiCad mode currently documented and accepted. It resolves to KiCad's footprint placement point, not a separate geometric centroid, exported relative to KiCad's aux axis origin, also called the drill/place file origin, with the same coordinate convention used by appz bom_cruncher. -o selects the output root.
Config
The JLC command uses the same kicad_cruncher.bom.config.v1 config as bom and pnp. The generated template documents the shared sections in a top block comment, and the command writes a plain bom.config.used.json snapshot beside generated workbooks. JLC output always pairs a grouped JLC BOM workbook with a JLC CPL workbook. The BOM side uses field alias coalescing and bom.group_fields to decide which components collapse into one line item. The CPL side uses aux-axis/drill-place-origin-relative placement coordinates and the fixed JLC columns Designator, Layer, Mid X, Mid Y, and Rotation.
Output
The command writes a JLC BOM XLSX and CPL XLSX for each selected variant. The default config puts the paired files in the same output folder, normally output/jlc, with the output kind in each filename. Output paths use the shared config templates with Command, OutputKind, SourceStem, and VariantName tokens. Configured outputs write bom.config.used.json beside generated artifacts. JLC XLSX files use regular header rows without Excel filter dropdowns. CSV JLC output remains available through bom --format jlc-csv and pnp --format jlc-cpl.
Tests
L0 verifies command registration and help. Unit tests cover JLC row generation through the shared BOM/PnP model. L3 workflow tests exercise Yoshi JLC XLSX bundle validation for variant handling and fixture-backed command behavior.