@hpm-registry/cli
v0.1.2
Published
Hardware Package Manager — npm for KiCad components
Readme
hpm — Hardware Package Manager
npm for KiCad components. Install verified symbols, footprints, and 3D models directly into your KiCad project — no hallucinations, no manual downloads.
npm install -g @hpm-registry/cliWhy
Current EDA tools and AI agents rely on training data for component information — and hallucinate. hpm is a registry of structured, machine-readable component data transcribed directly from datasheets, paired with real KiCad files.
Every component in the registry ships with:
- Specs — structured value + unit pairs (e.g.
cpu_frequency_max: 72 MHz,supply_voltage: 2.0–3.6 V) so agents can filter and compare numerically without parsing strings - Full pin map — every pin by number, name, and electrical type (
power-in,signal-bidir,no-connect, etc.) so agents can wire components without reading the datasheet - Peripheral mappings — which pins belong to SPI1, UART2, I2C1, USB, ADC channels, etc. — the alternate function table as structured data
- Power domains — which pins connect to which supply rail, voltage range, and recommended decoupling per the datasheet application circuit
- Required externals — the passives and pull-ups the datasheet says are mandatory for minimum operation, with the nets they connect between
- Compliance — RoHS, REACH, AEC-Q grade as first-class fields, not free tags
- KiCad files — verified
.kicad_sym,.kicad_mod, and.stepfiles ready to drop into a project
The goal: an agent that installs a component via hpm has everything it needs to place it, wire it, and generate a correct BOM — without hallucinating a single pin.
Quick start
# In your KiCad project directory
hpm init
hpm install STM32F103C8T6That's it. Open KiCad — the component is in your schematic and PCB libraries.
Commands
hpm init
Initialize hpm in the current KiCad project directory. Creates hpm_components/, hpm.lock, and adds hpm to your KiCad lib tables.
hpm inithpm install [id]
Install a component by ID, or reinstall all components from hpm.lock (useful after cloning a project).
hpm install STM32F103C8T6
hpm install GRM155R71C104KA88D
hpm install # reinstall everything from hpm.lockhpm search <query>
Search the registry by part number, description, manufacturer, or tags.
hpm search stm32
hpm search "ldo regulator"
hpm search cortex-m3 --category microcontrollershpm info <id>
Show full component details — specs, package, datasheet, pin count.
hpm info STM32F103C8T6
hpm info AMS1117-3.3hpm browse
Interactively browse the registry by category and subcategory.
hpm browsehpm list
List all components installed in the current project.
hpm listhpm update [id]
Update a component to the latest registry revision, or update all installed components.
hpm update STM32F103C8T6
hpm update # update everythinghpm remove <id>
Remove a component from the project.
hpm remove STM32F103C8T6hpm link / hpm unlink
Manually wire or unwire hpm into the KiCad lib tables in the current directory. hpm init runs this automatically.
hpm link
hpm unlinkhpm clean
Remove any component directories in hpm_components/ that are not tracked in hpm.lock.
hpm cleanHow it works
When you run hpm install <id>, hpm:
- Fetches the component JSON from the registry at
registry.hpm-registry.com - Downloads the
.kicad_sym,.kicad_mod, and.stepfiles - Saves them to
hpm_components/<id>/ - Merges all symbols into
hpm_components/hpm.kicad_sym - Copies all footprints into
hpm_components/hpm.pretty/ - Records the component in
hpm.lock
KiCad reads hpm.kicad_sym and hpm.pretty/ via a single library entry added to sym-lib-table and fp-lib-table during hpm init. Every subsequent install just updates those aggregate files — no new library entries needed.
Project layout after install
your-kicad-project/
├── your-project.kicad_pro
├── sym-lib-table ← hpm entry added here
├── fp-lib-table ← hpm entry added here
├── hpm.lock ← tracks installed components
└── hpm_components/
├── STM32F103C8T6/
│ ├── STM32F103C8T6.kicad_sym
│ ├── STM32F103C8T6.kicad_mod
│ └── STM32F103C8T6.step
├── hpm.kicad_sym ← aggregate symbol library (KiCad reads this)
└── hpm.pretty/
└── STM32F103C8T6.kicad_mod ← aggregate footprint libraryContributing components
The registry is open — components live at hpm-registry. Submit a PR to add or improve a component.
Requirements
- Node.js 18+
- KiCad 6+
