Run these scripts from the repo root with Python 3.12+. They clone upstream libraries into
temp dirs, parse them, and write the index files under
data/.Sources
| Platform | Source | Repo | License |
|---|---|---|---|
| Symbols | Trace | buildwithtrace/trace-kicad-symbols-lib (GitHub) | KiCad Library License |
| Symbols | CERN | gitlab.com/ohwr/cern-kicad-libs (symbol side) | CERN-OHL-P-2.0 |
| Footprints | Trace | buildwithtrace/trace-kicad-footprints-lib (GitHub) | KiCad Library License |
| Footprints | CERN | gitlab.com/ohwr/cern-kicad-libs (footprint side) | CERN-OHL-P-2.0 |
source field (trace | cern); on id collisions, Trace
wins de-dupe.
scripts/sync.py — idempotent controller
Tracks the last-synced commit hash per source in data/.sync_state.json and only
re-clones/re-indexes a source whose upstream HEAD changed.
.pretty libraries into
data/trace-footprints/ and data/cern-footprints/ (both gitignored) and rebuilds the
combined footprints_index.json from both on every run, so neither source overwrites
the other.
Indexers
build_index.py (symbols)
Parses every
.kicad_sym via balanced-paren extraction, resolves extends
inheritance, classifies categories, and writes data/symbols_index.json (compact) plus
per-library data/libraries/{Name}.json (full pin data).build_footprints.py (footprints)
Accepts multiple
--data-dir args (infers source from the dir name), recursively
scans .pretty dirs, parses .kicad_mod (+ legacy .module) for pad count/types/tags/
3D model, de-dupes by id, and writes data/footprints_index.json.scripts/import_cern.py shallow-clones the CERN repo and copies the relevant libraries
(.kicad_sym → data/cern-symbols/ on the symbols repo; .pretty dirs →
data/cern-footprints/ on the footprints repo), writing a manifest.json.
Index shapes
The compact
symbols_index.json omits pin arrays; full pin data lives in per-library files
loaded on demand. Footprints carry their pad array inline in the index.CI
.github/workflows/sync-libraries.yml runs the sync on a daily cron (and manual dispatch),
and if the index changed, opens a PR (peter-evans/create-pull-request). The symbols
workflow is labeled symbols; the footprints workflow is labeled footprints.
