On This Page (10)
kcr design
Generate a clean, agent-first KiCad design review bundle (D0 layout) from .kicad_pro or .kicad_sch files. Emits review_summary.json, bom.csv, notes.json, compilation.json, clean black-and-white schematic SVGs with SVG-space .layout.json bounding-box sidecars, and PCB artifacts (pnp.csv, board_summary.json, routing_context.json, copper-layer SVGs).
| Command | Aliases | Category | Runtime | Config | Guide |
|---|---|---|---|---|---|
kcr design | kcr design-review, kcr dr | PCB Visualization & Design Review | Python kcr + Native Rust k3 | None (CLI flags only) | Rendering & Design Review: kcr design |
Usage
kcr design [-h] [-o OUTPUT] [--variant VARIANT]
[--doc PCBDOC] [--include-source-docs]
[--no-indexes] [--no-color]
[file]Native Rust CLI Equivalent (k3)
Implemented natively in k3 (aliases design-review, dr). Produces deterministic schematic SVGs, compiled schematic graph, enriched PCB copper SVGs, netlists, manifest (kicad_cruncher.design_review_manifest.d0), and README.
k3 design [-o OUTPUT] [--variant NAME] [--doc BOARD] [--include-source-docs] [--no-indexes] [file]Positional Arguments
| Argument | Description |
|---|---|
file | KiCad project or schematic file; optional when one .kicad_pro is in CWD |
Options
| Flag | Description |
|---|---|
-o, --output OUTPUT | Output directory (default: ./output/design_review) |
--variant VARIANT | KiCad build variant name for BOM/PnP/component fitted resolution |
--doc, --pcbdoc PCBDOC | Select a specific .kicad_pcb file to include in pcb/ |
--include-source-docs | Also export raw design JSON, netlist JSON, and .net under source_documents/ |
--no-indexes | Exclude lookup indexes from raw design JSON when --include-source-docs is set |
--no-color | Disable ANSI colors and animated spinners |
How It Works
kcr design (aliases kcr design-review, kcr dr) builds a self-contained, agent-first D0 design-review bundle from a KiCad project (.kicad_pro) or standalone schematic (.kicad_sch). Every artifact is written into a staging directory first and published atomically to -o <dir> (default ./output/design_review) only after every path listed in design_review_manifest.json is verified to exist inside the bundle.
Bundle Layout
| Path | Schema / Format | Contents |
|---|---|---|
README.md | Markdown | Agent-first navigation guide and quick component/net/sheet counts |
design_review_manifest.json | kicad_cruncher.design_review_manifest.d0 | Machine index of every written sheet, board, layer SVG, and optional source doc |
design_review_report.json | kicad_cruncher.design_review_report.a0 | Per-sheet render outcomes, warnings, and timings |
review_summary.json | JSON | Compact LLM-first summary (components, nets, power rails, ERC hints, directives, notes, sheets, boards) |
compilation.json | JSON | Authoritative compiled schematic connectivity graph |
bom.csv | CSV | Variant-resolved flat BOM |
notes.json | JSON | Consolidated schematic text/notes with SVG bounding boxes |
schematics/<Sheet>.svg + <Sheet>.layout.json | SVG + JSON | Clean black-and-white schematic SVGs paired with SVG-space bounding boxes for sub-circuit cropping |
pcb/ | CSV + JSON + SVG | pnp.csv, board_summary.json, routing_context.json, manifest.json (kicad_cruncher.pcb_svg_manifest.a0), and layers/<LAYER>.svg copper-layer review plots |
source_documents/ (opt-in) | JSON + .net | Raw design JSON, netlist JSON, and KiCad .net export when --include-source-docs is passed |
Input Auto-Detection
When file is omitted, kcr design searches in strict order:
- A single
*.kicad_proin the current working directory. - A single
*.kicad_proinside an immediate non-hidden child directory (matchingacr drrepo-root convenience).
Only .kicad_pro and .kicad_sch inputs are accepted. Passing a .kicad_pcb directly fails with exit code 1 (pass the owning .kicad_pro and use --doc <board> to select a specific PCB).
Flag Interactions & Diagnostics
--no-indexesrequires--include-source-docs:--no-indexesstrips lookup index tables from the raw design JSON insidesource_documents/. When--include-source-docsis not set,--no-indexeshas no visible effect becausesource_documents/is not emitted.
- Never-stop per-artifact diagnostics:
- Boards with no
Edge.Cutsoutline still emit empty SVGs and record the warning"board has no outline on Edge.Cuts and nothing to plot"rather than aborting the schematic review bundle. - Schematic and PCB render diagnostics are captured inside
design_review_report.jsonanddesign_review_manifest.jsonso reviewers see the complete picture in one pass.
- Boards with no
- Python
kcr designvs native Rustk3 design:- Both runtimes implement the identical D0 bundle contract, manifest schema, and CLI flags (
k3 dris typically much faster on large multi-sheet designs). See the Native Rust CLI (k3) Parity Guide.
- Both runtimes implement the identical D0 bundle contract, manifest schema, and CLI flags (
Quick Examples
# Generate a complete design review bundle from a KiCad project
kcr design project.kicad_pro -o output/design# Include KiCad source documents and index files
kcr design project.kicad_pro --include-source-docs -o output/design# Native Rust binary shorthand
k3 dr project.kicad_pro -o output/design