CoreLibrary is the canonical JSON source of the default component library shipped with OpenPCB. Components are KiCad-derived with strict provenance and signed .opclib releases.
git clone https://github.com/OpenPCB-app/CoreLibrary.git
cd CoreLibrary
bun install
bun validate # validate the source tree
bun test # run boundary + import + pack tests
bun pack --version 0.0.0-devRequirements: Bun ≥1.3.
Every symbol, footprint, component, and 3D model has a dotted ID:
openpcb.core.<kind>.<category>.<slug>
Examples:
openpcb.core.symbol.passive.resistor_iecopenpcb.core.footprint.passive.R_0603_1608Metricopenpcb.core.component.passive.resistor.r0603openpcb.core.3d.passive.r0603
Slugs are lowercase, words separated by _. Use IPC-7351B names for footprints (R_0603_1608Metric, not 0603).
bun tools/import-kicad.ts \
--symbol-lib path/to/Device.kicad_sym \
--symbol-name R \
--footprint-lib path/to/Resistor_SMD.pretty/R_0603_1608Metric.kicad_mod \
--category passive \
--slug r0603The importer produces symbol, footprint, and component JSON files with full provenance metadata (source, upstreamUrl, upstreamCommit, convertedAt, etc.). Always commit a passing bun validate --release --strict before opening a PR.
KiCad-derived assets must declare:
source,license,attribution[]sourceFormat,sourceFileName,sourceLibrary,sourceItemNamesourceHash(SHA-256 of upstream)upstreamUrl,upstreamCommitconvertedAt,conversionTool
See existing files under symbols/, footprints/ for reference.
Each footprint references one STEP-backed .model.json sidecar; the .step source is committed under 3d/<category>/. The runtime .glb is generated at bun pack (and is gitignored, not committed). If a STEP is unavailable upstream, leave the entry out and defer the part to Wave 2 — do not ship a hollow placeholder (validate --release requires exactly one STEP-backed 3D model per footprint).
bun test covers:
- Schema validation (Ajv against
schemas/*.json) - Cross-references: every component's symbol pins must match its footprint pads
- Uniqueness of IDs and UUIDs
- shared-package boundary (no in-repo duplicates of
@openpcb/*packages)
Maintainers only — see README.md "Releasing" section. Tag pattern is v<major>.<minor>.<patch> (aligned with OpenPCB app: v0.1.0-beta.N during beta).
CoreLibrary contents are licensed under CC-BY-SA-4.0 with the OpenPCB Library Exception (mirrors KiCad library licensing). See LICENSE.md, ATTRIBUTION.md, and NOTICE.md.