Tools

npnp: EDA library export CLI

Export LCSC parts to KiCad, Altium Designer, and Cadence libraries with npnp, a Rust CLI for scripts, batch jobs, and CI.

/utils/1 of 33 min read727 words
  • tools
  • eda
  • kicad
  • altium
  • cadence
Contents

npnp (Normalize Pin Net Pad) converts LCSC / EasyEDA component data into EDA libraries from the command line. Use it for one part, a batch of IDs, or an automated workflow. This guide reflects the local 3.1.0 source tree.

Repository · Releases · Full documentation

Export targets#

Target Output
KiCad Symbols (.kicad_sym), footprints (.pretty), and STEP models (.3dshapes).
Altium Designer Individual or merged .SchLib / .PcbLib files, with STEP data embedded when available.
Cadence Capture Library XML, Allegro SKILL scripts, and STEP models. Import and generation run inside the Cadence tools.

The project documents compatibility with KiCad 9.0+, Altium Designer 23.x+, and Cadence SPB 26.1. Allegro footprint generation requires a SKILL-capable edition.

Install#

Download a native archive from Releases, or install with Cargo:

cargo install npnp

Release archives cover Windows, Linux, and macOS on supported x86_64 and ARM64 platforms. Run npnp p for ready-to-run workflow examples.

Common commands#

Search for a component, then export to your target tool:

npnp search C2040 --limit 5
npnp altium C2040 -o altium_libs
npnp kicad C2040 -o kicad_libs --name MyParts
npnp cadence C2040 -o cadence_libs --name MyParts

Read component IDs from a plain-text file and process a batch:

npnp altium -i ids.txt -o altium_libs --name MyParts -j 4
npnp kicad -i ids.txt -o kicad_libs --name MyParts -j 4
npnp cadence -i ids.txt -o cadence_libs --name MyParts -j 4

Add parts to an existing exported library, or download STEP models alone:

npnp kicad -i new_ids.txt -o kicad_libs --name MyParts --append -j 4
npnp model C2040 -o step_models
npnp model -i ids.txt -o step_models -j 4
  • -i accepts any plain-text filename; -j controls concurrent exports.
  • --name sets the library base name; --append updates the existing collection in the output directory.
  • --language auto|en|zh selects metadata language, with source fallback when English metadata is unavailable.
  • --full requests all supported targets for the selected EDA tool. Use --force only when replacement is intended.
  • Model-logo cleanup is enabled by default. --keep-model-logo retains original models; unsafe-to-clean models are kept and reported.

Merge existing libraries#

npnp merge -i path/to/libraries -o merged/MyParts

This offline command detects Altium or KiCad libraries directly inside the input folder. Keep the two formats in separate folders. -o is an output base path, not a directory; this operation merges libraries rather than converting formats.

KiCad merging supports modern symbol libraries, .pretty folders, and .3dshapes folders. It updates included footprint and model references. Identical entries are deduplicated; conflicting same-named KiCad entries stop the merge before outputs change. Existing outputs require --force.

Import Cadence output#

In Capture, use File → Import → Library XML to convert <library>.xml to an .olb library. In the Allegro PCB Editor command window, load the generated library script:

skill load("<library>_allegro/<library>.il")

Allegro creates .dra, .psm, and .pad files in that folder. npnp does not launch Cadence itself.

Export previews#

These images come from the local repository's showcase. Select an image to inspect the original at full size.

KiCad symbols and footprints#

KiCad 3D models#

Altium symbols and 3D models#

Altium PCB footprints#

Notes and license#

Review the symbols, footprints, models, and metadata in the target EDA tool before using generated libraries. Missing STEP data does not necessarily prevent symbol or footprint export; inspect the export summary.

For a desktop workflow, use SeEx. The repository includes a custom non-commercial license; see its LICENSE for the terms.

Discussion

Comments and discussion

Sign in with GitHub to leave a comment, ask a question, or add context.