Hardware as fast as software.
Loading README and project media…
Cursor for circuit boards. An AI agent that designs, documents, and validates real PCBs from a prompt, working directly on existing KiCad repositories.
Status: early. Phase 1 is implemented and the CLI runs. The technical specification is the source of truth; expect the surface to move before 1.0.
Full documentation lives at docs.copperhead.sh.
An AI product-development agent for hardware: from a product brief to manufacturable files, firmware, and a build plan.
copperhead create: full pipeline from a natural-language brief: spec, architecture, part selection, schematic, first-draft layout, then gerbers, firmware scaffold, and dev plan.copperhead do "<change>": operates on an existing KiCad repo the way a coding agent operates on a codebase.It reads and edits real .kicad_sch / .kicad_pcb files (s-expression text), maintains markdown design docs as memory, propagates every change across all artifacts that reference it, and verifies its own work by running kicad-cli ERC/DRC until the checks pass.
npm install -g copperhead # or: npx copperhead check
kicad-cli on PATHANTHROPIC_API_KEY or OPENAI_API_KEY in the environment (env var only, never a config file), except for check, which never calls an LLMIn an existing KiCad repository:
export ANTHROPIC_API_KEY=... # or OPENAI_API_KEY
copperhead init # scaffold docs/ from the schematic; idempotent
copperhead do "add reverse-polarity protection on VIN"
copperhead check # ERC + DRC + doc drift; no LLM, CI-safe
Starting from nothing instead? Write a product brief and run copperhead create --brief brief.md. The examples/ directory has ready-made briefs sorted by difficulty, plus a note on which one is designed to fail.
It's a loop, and it looks a lot like pair-programming, except the codebase is a circuit board.
Two invariants make this trustworthy:
Spec-gated in, verification-gated out: the design can't drift from its requirements, because drift is a build failure.
copperhead init [--path hardware/] # scaffold docs/ from an existing schematic; idempotent
copperhead do "<change request>" # the core loop: propose, edit, verify, propagate, commit
copperhead check # ERC + DRC + doc-drift + spec validation; no LLM calls (alias: verify)
copperhead sync [--dry-run] # verify the whole design state, resolve drift
copperhead create --brief brief.md # brief → full output package
Global flags: --repo <path> (default: cwd) and --json for machine-readable output. do and create take --model and --interactive; do also takes --dry-run, --max-turns, and --allow-dirty.
Nothing is a black box: decisions land in an append-only docs/DECISIONS.md, every run writes a human-readable summary next to its transcript, and a per-run docs/CHANGELOG.md narrates the design history.
From a checkout of this repo, run the smallest create-pipeline demo with the USB-C power breakout brief:
npm run demo:simple
The script creates or resumes a git repo at demo-runs/usb-c-breakout/ and runs:
copperhead create --brief examples/simple/usb-c-breakout.md
Pass normal create flags after --, for example npm run demo:simple -- --model claude.
If a stage fails, rerun the same command; the demo repo keeps a baseline commit and ignores run transcripts so retries start from the last committed design state.
More briefs, including medium and hard tiers, live in examples/.
Honest read of where the current release stands, so you can calibrate before pointing this at a board you care about:
init and check/verify are deterministic, LLM-free, and covered by the offline test suite against a real KiCad fixture: scaffolding, ERC/DRC, the s-expression reader, drift detection, and fab export all run green in CI.do, sync --resolve, create) is complete and structurally gated, but its acceptance tests need a live model and have not been observed passing end to end. Expect rough edges.The entire tool (agent core, prompts, tools) is public under Apache-2.0, built on an open stack (KiCad, kicad-cli, OpenSpec). Everything it produces is plain markdown and JSON in your own repo: no proprietary formats, no lock-in. This is a Chouhan Industries project, and the same commitment that puts every hardware schematic in public applies to the tool that designs them.
Contributions are welcome; see CONTRIBUTING.md for setup and workflow. Note that your first pull request requires signing the Contributor License Agreement; a bot posts instructions on the PR and signing is a one-time comment.
src/: CLI (cli.ts, commands/), the provider-agnostic agent loop (agent/), the kicad-cli wrapper and s-expression reader (kicad/), and doc/constraint memory (memory/)test/: offline suite plus fixtures/, a tiny known-good KiCad projectopenspec/specs/SPEC.md: the full technical specification, including binary acceptance criteriaopenspec/changes/build-copperhead-phase-1/: the implementation plan with proposal, design decisions, capability specs, and task checklist