A CLI that handles external components in a KiCad project by automatically importing them into your project symbol, footprint and 3d-model libraries.
It supports files downloaded from several vendors such as:
The CLI will:
- Handle the unzipping of files downloaded from the above providers.
- Place symbols, footprints and models in a defined directory structure.
- Convert KiCad v4 symbols (
.lib
files) to KiCad v6 symbols (.kicad_sym
files). - Link a symbol and footprint automatically.
- Automatically import the symbol *if a symbol library for that component exists (same goes for the footprint)
See it in action here
Or see an example project.
Download repository
git clone https://github.com/HarveyBates/kandle
cd kandle
mkdir build
cd build
cmake ..
make
make install # (optional, if not you need to add kandle/build/bin to your path)
If you want to permanently add the script to your path here is a tutorial.
In your terminal navigate to your KiCAD project. You want to be in the same
directory as your .kicad_pro
file. If not you will get an error message
saying "KiCad project not found in current working directory. Exiting.".
Setup (initialise) the directory structure.
kandle -I
This will result in a directory structure like this:
your_kicad_project/
├─ components/
│ ├─ extern/
│ │ ├─ 3dmodels/
│ │ ├─ footprints/
│ │ ├─ symbols/
│ │ ├─ tmp/ <--- unzipped files will be stored here
├─ fp-info-table
├─ sym-info-table
├─ project.kicad_pcb
├─ project.kicad_pro
├─ project.kicad_sch
Download a component from the supported vendors (as above). There is no need to rename the .zip
file, unless you would like a alternative name.
Kandle will remove "ul_" (from Ultra-Librarian) and "LIB_" (from CSE). It will also replace all -
or spaces
with _
.
Example: If the filename is
LIB_PESD 0402-140.zip
it will becomePESD_0402_140
.
Execute kandle passing the file you just downloaded and the library the part belongs to.
Example: If the part is an operational amplifier called LM358 stored in your
Downloads
directory. Your command would look like this:kandle -f Downloads/LM358.zip -l operational_amplifier
kandle -f <your_download_file_name>.zip -l <library_name>
Open Eeschema -> Preferences -> Manage Symbol Libraries -> Project Specific Libraries -> Add existing.
Using the above example, you would import the file components/extern/symbols/operational_amplifier.kicad_sym
.
Open PCBnew -> Preferences -> Manage Footprint Libraries -> Add existing.
Using the above example, you would import the file components/extern/footprints/operational_amplifier.pretty
.
Attention Kandle will automatically change default text size of footprint names to 1 with a thickness of 0.15 (KiCAD defaults).
Place on your Eeschema schematic. In the above example, you would search for operational_amplifier
and then select LM358. The symbol should already be linked to the footprint.
All future symbols and footprints of type operational_amplifier
will appear automatically so there is no need to repeat Step 5 again!
KiCAD 3rd Party Component Management Tool
Usage:
kandle [OPTION...]
-I, --init Initialise a KiCAD project with Kandle.
-L, --list List existing component libraries.
-f, --filename arg Path to zipped (.zip) component file.
-l, --library arg Name of the library the component belongs to.
-h, --help Help information.
Submit an issue with:
- A link to the component (if the issue is related to a component you are trying to import).
- A description of the issue that you are facing.
This project is MIT licensed, as found in the LICENCE file.