RepositoryPython
TousstNicolas

TousstNicolas/JLC2KiCad_lib

JLC2KICAD_lib is a python script that generate a component library (schematic, footprint and 3D model ) for KiCad from the JLCPCB/easyEDA library.

494stars
71forks
7issues
3views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: python-script

#1 Repository of the week

1
TINIX TRENDING·Topic: footprint

#1 Repository of the week

1
TINIX TRENDING·Topic: pcbnew

#1 Repository of the week

JLC2KiCadLib

PyPI version Python versions Downloads Code style: ruff Code style: ruff License: MIT

JLC2KiCadLib is a python script that generate a component library (symbol, footprint and 3D model) for KiCad from the JLCPCB/easyEDA library. This script requires Python 3.8 or higher.

Example

easyEDA originKiCad result
JLCSymbolKiCadSymbol
JLCFootprintKiCadFootprint
JLC3DmodelKiCad3Dmodel

Installation

Install using pip:

pip install JLC2KiCadLib

Install from source:

git clone https://github.com/TousstNicolas/JLC2KiCad_lib.git
cd JLC2KiCad_lib 
pip install . 

Usage

usage: JLC2KiCadLib [-h] [-dir OUTPUT_DIR] [--no_footprint] [--no_symbol] [-symbol_lib SYMBOL_LIB] [-footprint_lib FOOTPRINT_LIB]
                    [-models [{STEP,WRL} ...]] [--skip_existing] [-model_base_variable MODEL_BASE_VARIABLE]
                    [-logging_level {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [--log_file] [--version]
                    JLCPCB_part_# [JLCPCB_part_# ...]

take a JLCPCB part # and create the according component's kicad's library

positional arguments:
  JLCPCB_part_#         list of JLCPCB part # from the components you want to create

options:
  -h, --help            show this help message and exit
  -dir OUTPUT_DIR       base directory for output library files
  --no_footprint        use --no_footprint if you do not want to create the footprint
  --no_symbol           use --no_symbol if you do not want to create the symbol
  -symbol_lib SYMBOL_LIB
                        set symbol library name, default is "default_lib"
  -symbol_lib_dir SYMBOL_LIB_DIR
                        Set symbol library path, default is "symbol" (relative to OUTPUT_DIR)
  -footprint_lib FOOTPRINT_LIB
                        set footprint library name, default is "footprint"
  -models [{STEP,WRL} ...]
                        Select the 3D model you want to use. Default is STEP. 
                        If both are selected, only the STEP model will be added to the footprint (the WRL model will still be generated alongside the STEP model). 
                        If you do not want any model to be generated, use the --models without arguments
  -model_dir MODEL_DIR  Set directory for storing 3d models, default is "packages3d" (relative to FOOTPRINT_LIB)
  --skip_existing       use --skip_existing if you want do not want to replace already existing footprints and symbols
  -model_base_variable MODEL_BASE_VARIABLE
                        use -model_base_variable if you want to specify the base path of the 3D model using a path variable
  -logging_level {DEBUG,INFO,WARNING,ERROR,CRITICAL}
                        set logging level. If DEBUG is used, the debug logs are only written in the log file if the option --log_file is set
  --log_file            use --log_file if you want logs to be written in a file
  --version             Print versin number and exit

exemple use : 
        JLC2KiCadLib C1337258 C24112 -dir My_lib -symbol_lib My_Symbol_lib --no_footprint

The only required arguments are the JLCPCP_part number (e.g. Cxxxxx)

Example usage :

JLC2KiCadLib C1337258 C24112 -dir My_lib                       \
                             -model_dir My_model_dir           \
                             -footprint_lib My_footprint_lib   \
                             -symbol_lib_dir My_symbol_lib_dir \
                             -symbol_lib My_symbol_lib

This example will create the symbol, footprint and 3D model for the two components specified and will output the symbol in the ./My_lib/symbol/My_symbol_lib.lib file, the footprint and 3D model will be created in the ./My_lib/Footprint. This will result in the following tree to be created :

My_lib
├── My_footprint_lib
│   ├── My_model_dir
│   │   ├── QFN-24_L4.0-W4.0-P0.50-BL-EP2.7.step
│   │   └── VQFN-48_L7.0-W7.0-P0.50-BL-EP5.5.step
│   ├── QFN-24_L4.0-W4.0-P0.50-BL-EP2.7.kicad_mod
│   └── VQFN-48_L7.0-W7.0-P0.50-BL-EP5.5.kicad_mod
└── My_symbol_lib_dir
    └── My_symbol_lib.kicad_sym

Most of those arguments are optional. The only required argument is the JLCPCB part #.

The JLCPCB part # is found in the part info section of every component in the JLCPCB part library.

By default, the library folder will be created in the execution directory. You can specify an absolute path with the -dir option.

Dependencies

JLC2KiCadLib relies on the KicadModTree framework to generate the footprints.

Testing

The project has a pytest-based test suite in test/:

  • Unit tests (e.g. test/test_courtyard.py) run offline and exercise individual handlers/helpers with synthetic data.
  • Integration tests (test/test_components.py) generate real components from JLCPCB part numbers (defined in test/component_cases.py) and validate them against KiCad's KLC rules, using the kicad-library-utils git submodule.

To run the tests:

git submodule update --init
uv sync --group test
uv run pytest                       # unit tests only
uv run pytest -m integration        # integration tests (requires network access)

Notes

  • Even so I tested the script on a lot of components, be careful and always check the output footprint and symbol.
  • EasyEDA does not provide courtyard data, so footprints now get an auto-generated approximate courtyard (F.CrtYd, 0.25mm clearance around the copper/fab/paste/mask/edge-cuts bounding box), mirroring the approach used by KiCad's own EasyEDA importer.
  • I consider this project completed. I will continue to maintain it if a bug report is filed, but I will not develop new functionality in the near future. If you feel that an important feature is missing, please open an issue to discuss it, then you can fork this project with a new branch before submitting a PR.

License

Copyright © 2021 TousstNicolas

The code is released under the MIT license

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
markh-de/KiVar

PCB Assembly Variants for KiCad

65
Oct 12, 2026
RepositoryJavaScript
react/react

The library for web and native user interfaces.

253.0k
Nov 30, 2026
RepositoryPython
openscopeproject/InteractiveHtmlBom

Interactive HTML BOM generation plugin for KiCad, EasyEDA, Eagle, Fusion360 and Allegro PCB designer

4.7k
Nov 13, 2026
RepositoryPython
Bouni/kicad-jlcpcb-tools

Plugin to generate BOM + CPL files for JLCPCB, assigning LCSC part numbers directly from the plugin, query the JLCPCB parts database, lookup datasheets and much more.

2.2k
Nov 27, 2026
RepositoryPython
aklofas/kicad-happy

AI coding agent skills for KiCad electronics design. Works with Claude Code and OpenAI Codex. Analyze schematics, review PCB layouts, EMC pre-compliance, SPICE simulation, download datasheets, source components, and prep boards for fabrication.

1.8k
Nov 24, 2026
RepositoryPython
espressif/kicad-libraries

KiCad libraries for Espressif SoCs, modules, and DevKits.

1.4k
Nov 16, 2026
RepositoryPython
CDFER/JLCPCB-Kicad-Library

A set of symbols, footprints and 3d models of the basic components from JLCPCB's smt assembly

629
Sep 21, 2026
RepositoryPython
Travelerrrrrr/LCSC3D

Windows 便携工具:按立创 C 编号批量下载 STEP/OBJ 3D 模型,导出 Altium Designer SchLib/PcbLib 元件库,预览 3D、符号与封装,支持自更新。

146
Nov 26, 2026
RepositoryPython
hulryung/kicad-lcsc-manager

KiCad plugin for importing LCSC/EasyEDA components with symbols, footprints, and 3D models directly into your projects

84
Oct 23, 2026