Import GitHub schematic Libraries into KiCad

Does anyone know how to import a web based gethub library into KiCad. Or how to import just a part. I am looking for a DPDT switch and need the schematic symbol to finish my schematic. So my question is how to add a schematic symbol and / or pull a full gethub library into kicad. I am running OS X version of 4.0.5.

1 - to get the file from github, the simplest way is to download the zip. In the github project page, click on the green Clone or Download button, then select Download Zip. Once you have downloaded the zip, unzip in a suitable location e.g. c:\github

2 - In eeschema, click on Preferences->Component Libraries. Click on the top Add button and browse to c:\github, select the .lib file.

3 - Now when you click Place Component you can select the component from your newly added library

3 Likes

Hello and thank you.
Do you have to be a member of GetHub to see the down load button shown in your example?

Normally you should see this button even if you are not logged in. (You need to be on the “code” page of the repo. See screenshot)

But github also has private repositories. (This option is only available if you pay for it.) For such a repo you need to be a member.
What repo are you trying to access?

Is there an option of loading from Github directly instead of copying it locally? Just like adding footprints from Github?

+1 for this. we want both sides (schematic and pcb) to work the same. github repos with one directory being one library and one file being one part. KISS.

I don’t think the github plugin has ever been a good idea.

It creates more problems for users than it solves.
What are the main problems of the plugin?

  • If you insert one footprint today and one tomorrow they can differ. Kicad will not notify you that it inserted different versions of the same footprint. (The user has no control over the update cycle.)
  • You always need internet access.
  • It always downloads the full lib as a zip file. (Everytime you restart kicad it starts with no footprints at all. If you need footprints it downloads all of them. Even if you only need the names of the footprints contained in a lib.)
  • The github plugin needs one repo per footprint lib. (Because of the zip download stuff) This is no longer feasible for the library maintainers.

And i fear Kicad v5 will no longer include the github plugin. (Unless they get it to work with one large repo holding all footprint libs. This is unlikely)

The best option for users would be a kicad internal download manager that allows libs with version numbers. (Maybe one release per month)
With the option to download any library version you choose.
It would be nice if you get a notification as soon as your local version is behind the newest online version.
And an option to turn off the notification. Maybe also control the frequency with which it checks for new versions. (Ideally checking runs in a background thread that does not stall kicad if you don’t have an internet connection.)

I fear such a shiny download manager is in the distant future
In the meantime it will be possible to download the libs from the kicad webside. (Will be possible within the next few months) The releases will also be published on github.
So for v5 you might be forced to manually download the lib version you want. (The libs will be included in the installer. There might also be a light installer without libs at all for people with limited data.)

You can always checkout the libs locally via git. (in v5 this will be easier because all footprint libs will be in one large repo. This means you do not need to manage 100 different repos. but only 3 or 4)


About the one file per symbol suggestion:
The new file types (which have this feature) will not be included in kicad v5. Kicad v6 will most likely have this feature. (So this will take a while.)

Having one file per symbol/footprints does create some problems though. If some feature of kicad only needs the names of all symbols/footprints contained in a lib it needs to open all files and parse the symbol/footprint. (The filename can differ from the symbol/footprint name)

This is quite slow. (Many read cycles from a slow disk. It is better if you have the libs on a ssd but it is still quite slow compared to having everything in one large file. Or even better some database.)

The good thing about one file per footprint/symbol is that it makes it easy for us library maintainers. Different people can contribute to the same lib at the same time without the need for merging.

Nearly everything that has anything to do with technology is some sort of trade off. (You will never find a system that makes everyone happy.)

2 Likes