Package: kicad-helpers
Welcome to kicad-helpersScripts, templates, and examples for managing KiCad projectsProject goalsprovide a sensible default structure and scripts for managing KiCad projectsautomate everything that can be automated with continuous integrations scripts (e.g.,update BOMs, produce manufacturing files,run tests, generate documentation, etc.)configure git and KiCad to play nicely togethersupport customization via command line arguments, environment variables, etc.make everything easy to install/setup/usemakeawesome documentationInstall>pipinstallkicad_helpersSetup a new projectOpen a command line shell and navigate to the directory containing your KiCad project. Then runkh_updateto apply various project templates to the project directory:>cdkicad/project/path
>kh_updateBy default, this will install the following templates:.github/workflows/build.yml: a github workflow for updating the BOM, producing manufacturing files, running tests, generating documentation, etc.kitspace.yaml: metadata file for thekitspaceservice.kicad_helpers_config/config.kibot.yaml: configuration file forKiBotwhich allow automation of various KiCad actions.kicad_helpers_config/manufacturers/PCBWay.kibot.yaml:KiBotconfiguration to generate manufacturing files forPCBWayTo overwrite existing templates, runkh_updatewith the--overwriteflag:>kh_update--v--overwriteRender kitspace.yaml template.
Render settings.ini template.
Render .github/workflows/build.yml template.
Render .kicad_helpers_config/drc.yaml template.
Render .kicad_helpers_config/erc.yaml template.
Render .kicad_helpers_config/pcb_pdf.yaml template.
Render .kicad_helpers_config/pcb_svg.yaml template.
Render .kicad_helpers_config/sch_pdf.yaml template.
Render .kicad_helpers_config/sch_svg.yaml template.
Render .kicad_helpers_config/manufacturers/default.yaml template.
Render .kicad_helpers_config/manufacturers/PCBWay.yaml template.
Render tests/Tests.ipynb template.
"*.pro filter=kicad_project" already exists in /home/ryan/dev/python/kicad-helpers/_temp/.gitattributes
"*.sch filter=kicad_sch" already exists in /home/ryan/dev/python/kicad-helpers/_temp/.gitattributes
Add filters to git config.
"_autosave*" already exists in /home/ryan/dev/python/kicad-helpers/_temp/.gitignore
"*bak" already exists in /home/ryan/dev/python/kicad-helpers/_temp/.gitignore
"*.xml" already exists in /home/ryan/dev/python/kicad-helpers/_temp/.gitignore
".ipynb_checkpoints" already exists in /home/ryan/dev/python/kicad-helpers/_temp/.gitignore
"*-erc.txt" already exists in /home/ryan/dev/python/kicad-helpers/_temp/.gitignore
"*-drc.txt" already exists in /home/ryan/dev/python/kicad-helpers/_temp/.gitignore
"kibot_errors.filter" already exists in /home/ryan/dev/python/kicad-helpers/_temp/.gitignoreTo see the options that are available, run the command:>kh_update--helpusage: kh_update [-h] [--v] [--overwrite] [--root ROOT]

Setup a new project (or update an existing project) with templates from the `kicad_helpers/templates` directory. Also
installs git filters to prevent insignificant changes to the kicad `*.pro` and `*.sch` files from being tracked by git
(see https://jnavila.github.io/plotkicadsch/ for more details).

optional arguments:
  -h, --help   show this help message and exit
  --v          verbose (default: False)
  --overwrite  overwrite existing templates (default: False)
  --root ROOT  project root directory (default: .)Export a BOM from the KiCad schematic>kh_sch_to_bom--v/home/ryan/miniconda3/envs/kh/bin/python3.9 -m kifield -r --nobackup --overwrite --group -aq -x /home/ryan/dev/python/kicad-helpers/_temp/40-channel-hv-switching-board.sch -i /home/ryan/dev/python/kicad-helpers/_temp/manufacturing/default/40-channel-hv-switching-board-BOM.csvImport data from the BOM into the KiCad schematic>kh_sch_to_bom--v/home/ryan/miniconda3/envs/kh/bin/python3.9 -m kifield -r --nobackup --overwrite --fields ~quantity -x /home/ryan/dev/python/kicad-helpers/_temp/manufacturing/default/40-channel-hv-switching-board-BOM.csv -i /home/ryan/dev/python/kicad-helpers/_temp/40-channel-hv-switching-board.schRun all tests in thetestsdirectory>kh_testtesting /home/ryan/dev/python/kicad-helpers/_temp/tests/Tests.ipynb
All tests are passing!ContributorsRyan Fobel (@ryanfobel)