KiCad automations with plugins

Hi
I would like to automate these tasks:

  • Schematic > File > Plot
  • Schematic > Tools > Generate BOM
  • PCB > Launch “Fabrication toolkit” plugin and generate files
  • PCB > Launch “Generate Interactive HTML BOM” plugin and generate files
  • PCB > Launch “Board2PDF” plugin and generate files
  • Save a PCB 3DView in png or jpg

Is it easy to automate that? Which method do you recommend (CLI, Python, create a Plugin, use another plugin like KiBOT, …)?

Ideally I would like to do some file renaming and zip compression, but it can be done separately.

Thanks
AdriZ

Is it easy to automate that?
depends on you knowledge of scripting :upside_down_face:

I setup KiBot under gitlab here with a kicad Project. I highly recommend using the docker files where all the KiBot dependencies are already installed and let it run automatically in a gitlab runner. There are also examples for github runners.

Kibot is quite powerful, you might configure a lot of things :slightly_smiling_face:

I wouldn’t redo what others already have done, Kibot is a combination of CLI and Python scripts.

2 Likes

Hi,

I’m using the KiCad CLI and for me, it works really well.

Right now, I have a configuration file in each of my projects, which defines the layer count and version. I have a script which just runs different kicad-cli commands. It generates the following data which I attach to our GitHub release, and we can then send it to our manufacturer:

  • Gerber as ZIP-file including drill files
  • Position file for placement
  • 3D model
  • PDF of the top and bottom silk screen
  • Generating a PDF from the Gerber job file via Python and Pandoc (Stack-up)
  • BOM
  • Schematic as PDF

Everything with <Date>-<Project>-<Version>-<Type>.<ext.>

When the GitHub workflow is working, the version of the release will be used and the files will be attached automatically.

The only thing I’m missing is ERC and DRC via the CLI to check the design when a new commit occurs.

1 Like

Thank you for your replies.
From Kibot or CLI, can I call the plugins?

I saw Kibot seems powerful, but this is also what makes me afraid. I don’t want to have to redo what the plugins do actually well for my needs.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.