Hello World for action plugin?

I watched a very confusing youtube video [https://www.youtube.com/watch?v=hk6o5_-ox1c] and feel almost like giving up. It seems so complicated to make a simple baseline plugin.

I just want to know how i can make a simple hello world plugin.
I want to know how even i could have a plugin in kicad. Like is there maybe an example that i can drop into my plugin folder and go from there?
I tried copying existing installed plugins but that didnt work.

This is such a steep learning curve and i feel like its mainly due to confusing information online.

Can anyone help me and point me into the right direction?

This is my tutorial for version7 (and should work in v8/v9) It does Not use the newer approach - just put the file into the scripting/Plugins folder…

Get it running then tweak with your actions…

I would recommend to use the new API instead of the swig bindings. I think the plan is to deprecate the swig bindings at some point (possibly already in v10?). The documentation hasn’t quite caught up yet. But you can work off the examples: examples · main · KiCad / KiCad Source Code / KiCad API Python Bindings · GitLab

1 Like

What is the “new” way of doing things?

Also i am kinda lost. why do people have standalone scripts where they have to manually put in bord paths etc. can’t i make a plugin for kicad “ingame” usage?

I want a button and context menus inside kicad. the whole writing a script outside of kicad seems like a buggy mess that will break any moment?

maybe i am not really getting what the intended workflow is here.

Here’s a thread I started on this topic: KiCad 9.0 Python API

It is probably a bit early for a newbie to start with the new API. However the old API will be deprecated “soon”.

No, nothing goes into the Board Path.
Once Plugin’s are placed into the Plugins folder, the Plugin is available to all your Kicad projects.

Until it changes, there is a Scripting Folder that contains the Plugins Folder. That is where to put your .py and Icon file.

The ‘Newer’ way is to use the API. With a Meta file/etc it registers the Plugin. But, I prefer the older way.
In either case, the .py is about the same.

The Plugin (either old or newer) can be a complete Code contaiing GUI/Buttons/the whole enchilada. And, it can call other App’s

Had the same issue. After some research, got a Hello World plugin working.

I put it on Github if you are interested: