Skip to main content

Intelligent KiCad Bill of Materials generator with inventory matching

Project description

jBOM — KiCad Bill of Materials and Placement Generator

Why jBOM?

Designing a PCB in KiCad is only part of the journey that results in a fabricated and assembled electronic product. PCB fabrication requires Gerber files; assembly requires a Bill of Materials (BOM) and a Placement file (CPL/POS). jBOM generates all three.

The common KiCad workflow has you annotate your KiCad symbols with supply chain details such as "IPN:RES-331-0603", "MFG:Yageo", "MPN:CC0603KRX7R9BB104", "LCSC:C123456", and then use KiCad's fabrication plugins to generate BOM and CPL files. This mechanism is easy to understand, and, through KiCad's web/database library integration, plugins such as Part-DB, InvenTree, PartsBox and GitPLM connect to extensive parts databases. While these this workflow has proven sufficient for many developers, it inadvertently makes it difficult to decouple supply chain evolution from a project's electronic and mechanical specifications.

jBOM solves this by separating part selection from circuit design. You design with generic values ("10k, 5%, Resistor_SMD:R_0603_1608Metric"), maintain a currated inventory file with your desired parts, and jBOM intelligently matches them at BOM generation time. Changing suppliers or cost reducing a set of projects is as simple as updating an inventory spreadsheet.

Documentation

Command line: docs/README.man1.md Python Library API: docs/README.man3.md KiCad Eeschema Integration: docs/README.man4.md jBOM Inventory File Format: docs/README.man5.md

Installation

Requires Python 3.10 or newer.

From PyPI (recommended):

# Basic installation (with only CSV inventory support)
pip install jbom

# With CSV, Excel and Numbers spreadsheet support
pip install jbom[all]

# With CSV and Excel support
pip install jbom[excel]
# With CSV and Apple Numbers support
pip install jbom[numbers]

# With Mouser Search support
pip install jbom[search]

Quick Start

Scenario: New KiCad project → JLCPCB manufacturing files.

1. Extract an inventory template

jbom inventory MyProject/ -o inventory.csv

This writes one row per unique Value + Package combination found in your schematics. IPN, Category, Value, and Package are pre-filled; supplier columns (LCSC, Manufacturer, MFGPN) are blank for you to complete.

2. Audit schematic field quality

Before filling in part numbers, verify your schematic fields are complete:

jbom audit MyProject/ -o report.csv

This checks every component against jBOM's field taxonomy and writes findings to report.csv. Open it in a spreadsheet, fill in ApprovedValue for any QUALITY_ISSUE rows, set Action to SET, then apply the fixes back to your schematic:

jbom annotate MyProject/ --repairs report.csv

Once the schematic is clean, verify your inventory covers every component:

jbom audit MyProject/ --inventory inventory.csv

3. Fill in part numbers for JLC's LCSC supplier

An inventory file maps your generic schematic values to real parts from a supplier's catalog — in this case LCSC, which JLCPCB uses for sourcing. Open inventory.csv and fill in the LCSC column for each part you want JLCPCB to source. Set Priority to 1 on rows you want matched first.

To find LCSC part numbers:

  • Search interactively: jbom search "10k 0603 resistor" --supplier lcsc
  • Look up manually at jlcpcb.com/parts
  • Export your JLCPCB private parts library (User Center → My Inventory → My Parts Lib → Export) and load it alongside: --inventory project.csv --inventory jlc_library.xlsx

Coming soon: jbom inventory MyProject/ --supplier lcsc --limit 3 -o inventory.csv will search and populate part numbers automatically.

4. Generate fabrication files

Use jbom fab for a one-shot run that writes everything to a production/ folder:

jbom fab MyProject/ --jlc --inventory inventory.csv

This produces:

production/
  jbom.csv                    ← BOM for JLCPCB
  cpl.csv                     ← component placement
  MyProject_1.0.zip           ← Gerber archive for upload (requires kicad-cli)
  backups/MyProject_1.0_....zip

Or generate files individually:

jbom bom MyProject/ --jlc --inventory inventory.csv   # writes MyProject.bom.csv
jbom pos MyProject/ --jlc                             # writes MyProject.pos.csv
jbom gerbers MyProject/ --jlc                         # writes gerbers/ (requires kicad-cli)

Preview without writing: jbom bom MyProject/ --jlc --inventory inventory.csv -o console


For the full step-by-step walkthrough, options, and troubleshooting tips, see the Tutorial series.

KiCad Integration

Run jBOM directly from KiCad's Generate BOM dialog — see docs/README.man4.md for setup.

Quick summary:

  1. In Eeschema, go to ToolsGenerate BOM.
  2. Add a plugin with the command:
    python3 /path/to/kicad_jbom_plugin.py "%I" --inventory /path/to/inventory.csv -o "%O" --jlc
    
  3. Click Generate.

Configuration

Built-in fabricator profiles: --jlc, --pcbway, --seeed.

To create a custom profile or configure organisation-wide defaults, see docs/tutorial/README.documentation.md and docs/README.configuration.md.

Contributing

Contributions are welcome! jBOM is developed on GitHub at github.com/plocher/jBOM.

To contribute:

  1. Fork the repository
  2. Create a feature branch
  3. Run tests: pytest && python -m behave --format progress
  4. Submit a pull request

Regenerate deterministic search parity artifacts (fixture-based): python scripts/generate_search_parity_artifacts.py

Regenerate baseline-vs-candidate parity delta evidence: python scripts/generate_search_parity_delta_report.py

See docs/CONTRIBUTING.md for details.

License: AGPLv3 — See LICENSE file for full terms. Author: John Plocher

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jbom-6.56.0.tar.gz (649.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jbom-6.56.0-py3-none-any.whl (342.6 kB view details)

Uploaded Python 3

File details

Details for the file jbom-6.56.0.tar.gz.

File metadata

  • Download URL: jbom-6.56.0.tar.gz
  • Upload date:
  • Size: 649.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for jbom-6.56.0.tar.gz
Algorithm Hash digest
SHA256 2c212b5bfe16875033c67b148666e0c93964af016321a6f6b8f00d9b8e933951
MD5 2546823e18037d95cf339400d978fac9
BLAKE2b-256 f530165a2478bd6ec1b4e8ef1d850e0ad0fe3aae13b1dd4bf3886353005ff527

See more details on using hashes here.

File details

Details for the file jbom-6.56.0-py3-none-any.whl.

File metadata

  • Download URL: jbom-6.56.0-py3-none-any.whl
  • Upload date:
  • Size: 342.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for jbom-6.56.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4fef4d0da5b0dbb01e387da48e3800d131499b7532255f9b73345bd7f51cc86b
MD5 93af790cca4ceb292e4301208be3e38c
BLAKE2b-256 6b997a9cdd89aaf9fb519c87530d9c84aca2d230d6bc7988fb3f9dfd52541201

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page