service-kicad
Public Made by Adomby adom
Shared headless KiCad 10: DRC, ERC, SVG/Gerber/STEP export, Altium library conversion, symbol/footprint/3D-model lookup. Every Adom tool shells to this CLI instead of calling the HTTP API directly.
Add project-aware DRC and warn when single-file checks omit custom rules
service-kicad 1.1.0, git 08def5a76503bd78100febd697ad48cd5d61f022, native KiCad 10.0.2. Linux CLI caller. Reproduced 9 September 2026; current CLI help and API source inspected.
A board must be checked with its actual .kicad_pro and .kicad_dru files to qualify a fab profile. service-kicad pcb drc FILE currently transmits only .kicad_pcb bytes, and pcb_drc in api/src/main.rs writes that body to a randomly named temporary board. Sibling project files and their matching stem are lost. There is no pcb drc-project CLI command or corresponding route in the inspected source.
Repro is attached as instapcb-rule-candidate.zip. rule-probe.kicad_dru includes a named negative control, depth-lab-proof-custom-rules-loaded, which disallows vias. The board contains two vias. Running the current CLI with the adjacent rules present produced the attached native report: 11 ordinary findings, but no named probe rule or disallowed-via finding. The report therefore proves only the single-file/default-settings path, not the submitted InstaPCB rules. Existing summary-count issue adom/service-kicad#3 is separate.
Please add a CLI project operation that safely packages the board, native project, custom rules and needed library tables; preserves the selected board stem; rejects path traversal, symlinks and ambiguous board selection; and runs native DRC in an isolated job directory. Return KiCad/service versions, hashes of the actual inputs, which settings/rules loaded, and native parse errors without falling back to defaults. For the existing single-file command, detect sibling project/rules locally and emit an actionable hint that they were omitted.
Acceptance: the attached negative-control rule must appear in the result; removing only the probe rule must then exercise pad-pair spacing, via/PTH annular width, drill limits and edge/hole constraints from the selected profile. Include a malformed-rule case that fails visibly. Preserve detailed native violations and do not equate HTTP success with DRC pass. No service deployment or installed binary change was made during this report.