Commit Graph

6 Commits

Author SHA1 Message Date
596372b78d Replace text diagram with Mermaid flowchart in README
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 23:43:14 +00:00
aec161533f Document --prefix ~/.local install for unprivileged environments
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 23:33:37 +00:00
5f4dc206b7 Add package.json and npm install instructions
Adds bin entry so kicad-query is available as a global command
after npm install -g. Also marks the script executable.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 23:32:29 +00:00
068d5da12b Add README with usage docs and examples
Covers motivation, architecture overview, full query reference,
and side-by-side human/JSON output examples.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 23:30:49 +00:00
ec46df5d14 Refactor: separate data functions from rendering
Query functions now return plain data objects. Two renderers
(render_human, render_json) handle output formatting. A single
run_query dispatcher routes to the right data function by file
type and query name, then main() calls the appropriate renderer
based on --format. Eliminates duplicated *_json variants and
the OUTPUT_FORMAT global.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 23:29:29 +00:00
f3fddfac4b Initial implementation of kicad-query helper
Generic S-expression parser feeding into KiCad-specific queries.
Supports .kicad_sch (summary, components, component, nets),
.kicad_pcb (summary, nets, net, footprints, footprint, traces),
and .kicad_pro (summary). The 'traces' command does BFS through
segments and vias to show the physical copper path from a specific
pad. All queries support --format=json for structured LLM output.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 23:09:14 +00:00