Klib
Wykys's KiCad library and toolkit. This repository is a mirror of https://gitlab.com/wykys/klib, so please direct the issue there.
Install / Use
/learn @wykys/KlibREADME
Wykys's KiCad Library
KLIB (KiCad Library) is a toolkit and libraries for hardware development in KiCad.
Installation for GNU/Linux
Requires python3+
git clone git@gitlab.com:wykys/klib.git
cd klib/scripts
make install
Scripts
The KLIB contains scripts for easy work with KiCad. You can run all the scripts simply through Makefile. For the correct operation of this scripts, it's important to run the script from the klib/scripts directory!
HELP
Lists basic help.
Use:
make help
INSTALL
Creates the Python environment needed for some scripts. Clones the official KiCad repository with scripts for checking KLC. Configures KiCad settings. The installation will also make the following scripts available on the system:
klib-update- Updates library tablesklib-upgrade- Updates repositories, configurations and scriptsklib-check-symbol- Check KLC schematic symbolklib-check-footprint- Check KLC footprint
Use:
make install
UPDATE KICAD ENVIROMENT VARS
This script automatically sets the environment variables necessary for the KLIB correct function. Extends the ~/.config/kicad/6.0/kicad_common.json file with the following variables:
{
"environment": {
"vars": {
"KLIB_SYMBOL_DIR": "path_to_klib/symbols",
"KLIB_3DMODEL_DIR": "path_to_klib/3dmodels",
"KLIB_FOOTPRINT_DIR": "path_to_klib/footprints"
}
},
}
Use:
# the first option is to run the command
make
# the second option is to run the command
make update_kicad_vars
UPDATE KICAD LIB TABLES
This script updates the library tables. It does this by searching for KiCad and KLIB library files (extensions: .kicad_sym and .pretty) and updating the sym-lib-table and fp-lib-table files based on data analysis.
# the first option is to run the command
make update_kicad_lib_tables
# it is equivalent
klib-update
VENV
If it does, it removes the current Python environment in the next step creating a new environment where it installs the packages that are listed in the requirements.txt file.
Use:
make venv
STL TO X3D
I use Blender to convert STL to X3D. I have created a Blender API script that will make the necessary transformations before exporting to X3D to correctly display the output in KiCad.
RUN
Runs python script in KLIB python environment.
Use:
make run script=~/your_script.py
Types for users:
- the variables are used in the following ways:
${KLIB_SYMBOL_DIR}/path_to_lib ${KIPRJMOD}is path to current KiCad project folder
Links
- KiCad Library Convention KLC
- KLC Helper Scripts KiCad Library utilities
Related Skills
node-connect
354.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
112.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
354.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
354.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
