On This Page (5)
Native Rust CLI (k3) Parity Guide
kicad-cruncher ships in two complementary executables built from the same workspace and sharing the same JSONC configuration files, output schemas, and TypeSpec wire contracts:
kcr/kicad-cruncher(Python package on PyPI) — the complete 17-command CLI, including formatted.xlsxBOM/PnP/JLC workbooks, project scaffolding (project), local library maintenance (project-lib,lib-extract,megamaid), asset auditing (health), PCB cleanup & 3D STEP embedding (pcb), and local KiCad workstation control (kicad).k3(standalone native Rust binary,kicad-cruncher-cli) — a zero-Python, single-executable native binary built directly onkicad-monkey-core,kicad-monkey-fab,kicad-monkey-svg, andkicad-monkey-contractsfor fast CI pipelines, deterministic fabrication, rendering, and design-review automation.
This page is the canonical command-by-command parity matrix between kcr and k3.
Command Parity Matrix
Commands Available in Both kcr (Python) and k3 (Native Rust)
| Command | Aliases | Shared Config | Parity & Key Differences |
|---|---|---|---|
fab | gerbz, ipc2581 | fab.jsonc | Native Gerber X2/X1, Excellon NC drill, IPC-2581B, PnP/BOM CSV, Micro-STEP, virtual layers, and --bake. k3 fab adds independent --drill/--no-drill, --all, --svg, --layer-svgs, --aux-origin, --no-silk, and --x1 CLI shortcuts (see details below). |
vdoc | virtual-doc | <stem>.vdoc.jsonc / vdoc.jsonc | Full parity across boards (.kicad_pcb / .kicad_pro), standalone footprints (.kicad_mod), and .pretty libraries, including --preset, --clean/--no-clean, --fab-only/--outlines-only, --filter, polarity overrides, and --json. |
bom | — | ./bom.config | Native CSV, grouped CSV, JLC CSV, and JSON (csv, grouped-csv, jlc-csv, json, raw-json, grouped-json, generic-json). Python kcr bom additionally writes formatted .xlsx workbooks (xlsx, grouped-xlsx, jlc-xlsx) and legacy-json. |
pnp | — | ./bom.config | Native csv, json, and jlc-cpl centroid exports (mm/mils, variants, --exclude-no-bom). Python kcr pnp additionally writes .xlsx (xlsx, jlc-cpl-xlsx). |
jlc | — | ./bom.config | k3 jlc writes CSV files (jlc-csv + jlc-cpl) under ./output/jlc and adds --gerbers to bundle Gerber X2 + NC Drill. Python kcr jlc writes formatted .xlsx workbooks (jlc-xlsx + jlc-cpl-xlsx) under ./output/jlc (via ./output + {Command}) and prints the missing-LCSC audit table. |
pcb-layer-step | — | pcb-layer-step.jsonc | Both emit self-contained ISO 10303-21 Micro-STEP + manifest with zero Geometer/OCCT dependency. See config divergence below (k3 reads flat root-level keys only, does not auto-create the file, and emits underscore schema token on --init-config). |
pcb-svg | — | <stem>.pcb.svg.config / pcb.svg.config | Full parity on composed views, HLR, 3D STEP resolution, --embedded-only, --workers 1..64, and .kcr/cache. Sibling fab.jsonc inheritance is Python kcr-only (see below). |
toon | — | toon.config | Full parity across all 8 solder-mask themes, --soldermask-color, --side, --assembly, --footprint, --variant/--all-variants, --embedded-only, --workers, --cache-dir/--no-cache, and --timings. Sibling fab.jsonc inheritance is Python kcr-only. |
design | design-review, dr | None | Full D0 bundle parity (review_summary.json, compilation.json, bom.csv, notes.json, schematic SVGs + .layout.json, pcb/ artifacts, design_review_manifest.d0, --include-source-docs, --no-indexes). |
version | -V, --version | None | Both print version info; k3 --build-info additionally emits a machine-readable JSON build-identity payload. |
Python-Only Commands (kcr Only)
These 7 commands are currently implemented only in the Python kcr CLI:
| Command | Purpose |
|---|---|
kcr project | Scaffold new KiCad projects via flags, JSONC config, or Textual --tui |
kcr project-lib | Extract metadata-preserving project-local libraries, update tables, and relink sources |
kcr health | Read-only project asset & 3D STEP portability audit (--require-embedded, --fail-on-issues) |
kcr megamaid | Full non-destructive project dissection (libraries + embedded_assets/ + design_review/) |
kcr lib-extract | Lean cleaned library extraction (power symbols skipped) for lib_cruncher |
kcr pcb | Standalone pcb clean and native KiCad 10.0.8 pcb embed-models |
kcr kicad | Local KiCad installation, running-process, launcher, and kicad_common.json prefs helper |
Behavioral & Flag Differences to Watch
fab: Drill toggle independence & extra native shortcuts:- In Python
kcr fab,--gerbersand--no-gerberstoggle both Gerber and Excellon NC Drill together. - In Rust
k3 fab,--gerbers/--no-gerbersand--drill/--no-drillare independent flags.k3 fabalso offers--all,--svg,--layer-svgs,--aux-origin,--no-silk, and--x1directly on the CLI.
- In Python
bom/pnp/jlc: XLSX vs CSV/JSON & variant flag conflict:k3has zero Python/openpyxl dependency, sok3 bom,k3 pnp, andk3 jlcemit CSV and JSON formats only (no.xlsx, andlegacy-jsoninbomis Pythonkcr-only).k3 bom,k3 pnp, andk3 jlctreat--variantand--all-variantsas mutually exclusive (error), whereas Pythonkcraccepts both and lets--all-variantswin.k3 jlcadds--gerbersto bundle Gerber X2 + NC Drill alongside the JLC BOM/CPL CSVs, and defaults-odirectly to./output/jlc.
- Sibling
fab.jsoncinheritance (vdoc,pcb-svg,toon):- Sibling
fab.jsonc"virtual_layers"inheritance is Pythonkcr-only acrosskcr vdoc,kcr pcb-svg, andkcr toon(k3only readsfab.jsoncink3 fab). - Put shared visual or virtual-layer settings directly in
vdoc.jsonc,pcb.svg.config, ortoon.configif you run bothkcrandk3against the same repository.
- Sibling
pcb-layer-stepconfig divergence:k3 pcb-layer-steponly reads flat root-level config keys (ignoring Python's structureddefaults.*andoutputs[]blocks) and never auto-createspcb-layer-step.jsonc.k3 pcb-layer-step --init-configemits"schema": "kicad_cruncher.pcb_layer_step_config.a0"(underscore), whereas Pythonkcr pcb-layer-stepstrictly requires"schema": "kicad_cruncher.pcb_layer_step.config.a0"(dot).
- 3D STEP resolution &
.kcr/cacheparity:- Both
kcrandk3resolve embeddedkicad-embed://STEP/STP payloads first, then fall back to external STEP/STP files (plus.wrl->.step/.stpsiblings). - The
--embedded-onlyCLI flag applies topcb-svg,toon, and footprint-modevdoc; setKCR_EMBEDDED_MODELS_ONLY=1to enforce embedded-only resolution in Pythonfaband board-modevdocas well. - Both share the same persistent
.kcr/cachedirectory layout beside the project or board (--cache-dir/--no-cache) and--workers 1..64concurrency bounds.
- Both
- Global flags:
- Both accept
--quiet,--verbose,--log-level {debug,info,warning,error,critical}, and--no-color. k3additionally accepts top-level--build-infofor deterministic CI build provenance.
- Both accept