Batch export LCSC components from the command line into formats supported by Altium Designer (AD) and KiCad.
--- ## Before You Start > [!NOTE] > The source code is public again, but please follow the [LICENSE](LICENSE) when using this project. `npnp` stands for `Normalize Pin Net Pad`. It is the CLI tool I built while reverse-engineering parts of the `Altium Designer` library format and cleaning up the LCSC / EasyEDA export workflow. It is intended for users who need scripting, batch processing, CI, or simply prefer a command-line tool. If you need a GUI, use the related [`SeEx`](https://github.com/ref42/seex) application. `npnp` and `SeEx` should keep the same export behavior wherever possible, especially: - KiCad `3D` export writes downloaded STEP data directly, without the expensive STEP parse-and-rewrite pass. - KiCad STEP downloads use the same LCSC model endpoint and HTTP transport as Altium. - Both Altium and KiCad support Chinese or English metadata export; when the requested language is missing, existing source metadata is preserved as fallback. - Generated libraries are intended for real EDA use, but they should still be visually checked before production. If you find an issue in exported symbols, footprints, 3D models, or metadata, please open an `issue` with the LCSC ID, target EDA, export command, and screenshots. PRs are not merged by default unless the maintenance direction is agreed in advance. ## What Can npnp Do? ### KiCad - [x] Export KiCad-compatible `Symbol`, `Footprint`, and `3D` model formats. - [x] Export individual components or batch export from a text file. - [x] Append or update existing `.kicad_sym`, `.pretty`, and `.3dshapes` libraries. - [x] Write STEP models directly into `.3dshapes` and reference them from footprints. ### Altium Designer (AD) - [x] Export individual `.SchLib` and `.PcbLib` libraries. `.PcbLib` embeds upstream STEP data when available. - [x] Support batch export. - [x] Export multiple components into one merged `.SchLib` / `.PcbLib` pair. - [x] Append new components to an existing npnp merged library without replacing the old components. ### Shared Features - [x] Export metadata in Chinese or English. - [x] Use parallel download and batch processing. - [x] Export `3D` models independently. - [x] Export raw symbol / footprint JSON for troubleshooting. - [x] Provide multi-platform Windows, macOS, and Linux release packages. ## Supported EDA Versions > [!NOTE] > These are the versions currently known to work. npnp may support additional versions. If a library exported by npnp cannot be opened by an older EDA version, please open an issue so compatibility can be considered. - [x] `KiCad 9.0` to `Latest` - [x] `Altium Designer 23.x` to `Latest` ## What Is Planned? - [ ] Continue improving the current Altium / KiCad workflows and fix more hidden `bugs`. - [ ] Improve solder mask handling for irregular pads during `.PcbLib` export. - [ ] Explore a broadly applicable way to remove or hide logo/watermark geometry from downloaded `3D` models. - [ ] Add more regression fixtures for unusual symbols, footprints, and `3D` models. - [ ] Improve documentation for batch merge, append, and CI workflows. ## Downloads Each tagged release builds native `npnp` CLI archives for: - Windows x86_64: `npnp-vX.Y.Z-windows-x86_64.zip` - Windows ARM64: `npnp-vX.Y.Z-windows-aarch64.zip` - Linux x86_64: `npnp-vX.Y.Z-linux-x86_64.tar.gz` - Linux ARM64: `npnp-vX.Y.Z-linux-aarch64.tar.gz` - Fedora x86_64: `npnp-vX.Y.Z-fedora-x86_64.tar.gz` - Fedora ARM64: `npnp-vX.Y.Z-fedora-aarch64.tar.gz` - Arch Linux x86_64: `npnp-vX.Y.Z-arch-x86_64.tar.gz` - Arch Linux ARM64: `npnp-vX.Y.Z-arch-aarch64.tar.gz` - macOS Intel: `npnp-vX.Y.Z-macos-x86_64.tar.gz` - macOS Apple Silicon: `npnp-vX.Y.Z-macos-aarch64.tar.gz` ## CLI Type `npnp p` to print ready-to-run commands. Export commands are grouped by target EDA tool: ```bash npnp search C2040 --limit 5 npnp altium C2040 -o altium_libs npnp altium -i ids.txt -o altium_libs --name MyParts -j 42 npnp altium -i new_ids.txt -o altium_libs --name MyParts --append -j 42 npnp kicad C2040 -o kicad_libs --name MyParts npnp kicad -i ids.txt -o kicad_libs --name MyParts -j 42 npnp kicad -i new_ids.txt -o kicad_libs --name MyParts --append -j 42 npnp model C2040 -o step_models npnp model -i ids.txt -o step_models -j 42 ``` Useful shared flags: - `--full`: export all supported library targets for that EDA tool. - `--force`: replace existing generated outputs. - `--language auto|en|zh`: select metadata language. `auto` uses source metadata, while `en` fetches English metadata with source fallback. - `-j`: maximum number of concurrent exports when using `-i`. - `-i`: reads IDs from any plain-text file; the filename does not need a `.txt` extension. - `--name`: optional override for the generated library base name. - `--append` updates the library collection inside the selected `-o` directory. For Altium it discovers the merged `.SchLib`/`.PcbLib`; for KiCad it discovers the `.kicad_sym`, `.pretty`, and `.3dshapes` libraries. ### Export contract - Generated component and model names are deterministic: `![]() Symbol library |
![]() Footprint library |
![]() 3D model |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |