Skip to main content

A package manager for KiCad projects

Project description

KiCad Package Manager

This is a package manager for KiCad symbols, footprints, 3d models, simulation files, and hierarchical sheets.

Goal

Create a format for distributing the following kind of KiCad features:

  • Symbols
  • Footprints
  • 3D Models
  • SPICE Simulation Code
  • Sub-sheets
  • Unit Tests
  • Command Runner
  • Plugins

Projects can be created that programmatically generate these files.

Currently Supports:

  • Symbols
  • Footprints

Up Next:

  • Subsheets
  • Command Runner
  • 3D Models

Installing KPM

Open the "KiCad Command Prompt"

pip3 install kicad-package-manager

In your KiCad project directory, run

kpm init

Then edit your kpm.json file as needed.

How to Install a Package

Find a package you want to use:

kpm list
kpm list | grep something
kpm search something
kpm show some_package

Then edit the dependencies list in your kpm.json to include a package and version. Example:

{
	"name": "cool-project",
	"version": "0.0.1",
	"author": "danroblewis",
	"homepage": "http://githab.info/magic/stuff",
	"commands": {
		"test": "./fictional-spice-tester"
	},
	"dependencies": {
		"kpm-jlcpcb-basic": "0.0.5",
		"eurorack-parts": "0.0.1"
	}
}

How to Create a Package

Create a directory, it can be a KiCad project directory or any directory. Probably put it under version control with something like git.

kpm init

This creates a kpm.json file. Add the dependencies your package will require to the dependencies list.

Your package will include your kpm.json file and any of these directories if they are present:

/symbols
/footprints
/3dmodels
/3dmodels
/plugins
/simulation
/sheets
/tests
/scripts

To build the package

kpm build

You should now have a package.zip file in your project directory.

To upload a package to the registry, first create a ~/.kpmrc file:

{
	"name": "yourname",
	"token": "arbitrarytokenonlyyouknow"
}

Then update the version in your kpm.json file.

Then run

kpm upload

You should then see your package in the kpm search <yourpackagename>

Usage

kpm init
kpm list
kpm search jlc
kpm show kpm-jlcpcb-basic
kpm install .

To add a new package to the package index, submit a pull request

kpm.json

{
	"name": "cool-project",
	"version": "0.0.1",
	"author": "danroblewis",
	"homepage": "http://githab.info/magic/stuff",
	"commands": {
		"test": "./fictional-spice-tester"
	},
	"dependencies": {
		"kpm-jlcpcb-basic": "0.0.5",
		"eurorack-parts": "0.0.1"
	}
}

Refresh Symbols and Footprints

After updating your libraries, the symbols/footprints in your schematic files won't have the latest changes. Do this to synchronize them:

  • In eeschema, click Tools > Update Symbols from Library..., then save
  • In pcbnew, click Tools > Update Footprints from Library..., then save

(If we can find a way to do this within kpm, that would be awesome.)

Package Directory Structure

/kpm.json

/symbols/
/symbols/mysymbols.kicad_sym

/footprints/
/footprints/myfootprints.pretty/
/footprints/myfootprints.pretty/myfootprints.kicad_mod

/3dmodels/
/3dmodels/something.step

/plugins/
/plugins/kicad-eurorack-tools/
/plugins/kicad-eurorack-tools/__init__.py

/simulation/
/simulation/mysim.spice

/sheets/
/sheets/mysubsheet.kicad_sch

/tests/
/tests/mytest.py

/scripts/
/scripts/mycommand.py

Project details


Download files

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

Source Distribution

kicad_package_manager-0.0.16.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

kicad_package_manager-0.0.16-py2.py3-none-any.whl (10.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file kicad_package_manager-0.0.16.tar.gz.

File metadata

File hashes

Hashes for kicad_package_manager-0.0.16.tar.gz
Algorithm Hash digest
SHA256 67678347bc810df5a824c1177005fec23f98b17acd1113d6f539a2545573f498
MD5 11f69e2a6f6a56ecfed2eba978f38f9b
BLAKE2b-256 cf21334ed487aaf0cdcd201349cfd278d038e3acda8f150c51b52d8d3ae821d4

See more details on using hashes here.

File details

Details for the file kicad_package_manager-0.0.16-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for kicad_package_manager-0.0.16-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8224050882acff039e42bb06f87c21e0746088e30f2e8a58ce40bac54273d5ae
MD5 6a25bf7d31326fc2f176fdc1beacdb16
BLAKE2b-256 178ed0f4c97d7ede58076bcb18d108bc27b0e0c4c709453715a1967937173b42

See more details on using hashes here.

Supported by

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