kicad monkey v2026.11.30
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:

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)

CommandAliasesShared ConfigParity & Key Differences
fabgerbz, ipc2581fab.jsoncNative 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).
vdocvirtual-doc<stem>.vdoc.jsonc / vdoc.jsoncFull 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.configNative 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.configNative 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.configk3 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.jsoncBoth 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.configFull 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.configFull 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.
designdesign-review, drNoneFull 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, --versionNoneBoth 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:

CommandPurpose
kcr projectScaffold new KiCad projects via flags, JSONC config, or Textual --tui
kcr project-libExtract metadata-preserving project-local libraries, update tables, and relink sources
kcr healthRead-only project asset & 3D STEP portability audit (--require-embedded, --fail-on-issues)
kcr megamaidFull non-destructive project dissection (libraries + embedded_assets/ + design_review/)
kcr lib-extractLean cleaned library extraction (power symbols skipped) for lib_cruncher
kcr pcbStandalone pcb clean and native KiCad 10.0.8 pcb embed-models
kcr kicadLocal KiCad installation, running-process, launcher, and kicad_common.json prefs helper

Behavioral & Flag Differences to Watch

  1. fab: Drill toggle independence & extra native shortcuts:
    • In Python kcr fab, --gerbers and --no-gerbers toggle both Gerber and Excellon NC Drill together.
    • In Rust k3 fab, --gerbers/--no-gerbers and --drill/--no-drill are independent flags. k3 fab also offers --all, --svg, --layer-svgs, --aux-origin, --no-silk, and --x1 directly on the CLI.
  2. bom / pnp / jlc: XLSX vs CSV/JSON & variant flag conflict:
    • k3 has zero Python/openpyxl dependency, so k3 bom, k3 pnp, and k3 jlc emit CSV and JSON formats only (no .xlsx, and legacy-json in bom is Python kcr-only).
    • k3 bom, k3 pnp, and k3 jlc treat --variant and --all-variants as mutually exclusive (error), whereas Python kcr accepts both and lets --all-variants win.
    • k3 jlc adds --gerbers to bundle Gerber X2 + NC Drill alongside the JLC BOM/CPL CSVs, and defaults -o directly to ./output/jlc.
  3. Sibling fab.jsonc inheritance (vdoc, pcb-svg, toon):
    • Sibling fab.jsonc "virtual_layers" inheritance is Python kcr-only across kcr vdoc, kcr pcb-svg, and kcr toon (k3 only reads fab.jsonc in k3 fab).
    • Put shared visual or virtual-layer settings directly in vdoc.jsonc, pcb.svg.config, or toon.config if you run both kcr and k3 against the same repository.
  4. pcb-layer-step config divergence:
    • k3 pcb-layer-step only reads flat root-level config keys (ignoring Python's structured defaults.* and outputs[] blocks) and never auto-creates pcb-layer-step.jsonc.
    • k3 pcb-layer-step --init-config emits "schema": "kicad_cruncher.pcb_layer_step_config.a0" (underscore), whereas Python kcr pcb-layer-step strictly requires "schema": "kicad_cruncher.pcb_layer_step.config.a0" (dot).
  5. 3D STEP resolution & .kcr/cache parity:
    • Both kcr and k3 resolve embedded kicad-embed:// STEP/STP payloads first, then fall back to external STEP/STP files (plus .wrl -> .step/.stp siblings).
    • The --embedded-only CLI flag applies to pcb-svg, toon, and footprint-mode vdoc; set KCR_EMBEDDED_MODELS_ONLY=1 to enforce embedded-only resolution in Python fab and board-mode vdoc as well.
    • Both share the same persistent .kcr/cache directory layout beside the project or board (--cache-dir / --no-cache) and --workers 1..64 concurrency bounds.
  6. Global flags:
    • Both accept --quiet, --verbose, --log-level {debug,info,warning,error,critical}, and --no-color.
    • k3 additionally accepts top-level --build-info for deterministic CI build provenance.
kicad-monkey v2026.11.30·Docs updated 2026.12.01 15:43 UTC (fd9b75b)