(Warning: work in progress!)
These are my KiCad schematic libraries, meant to be used with my PCB libraries:
https://github.com/cpavlina/kicad-pcblib
For preview renders, look here:
https://github.com/cpavlina/kicad-schlib-preview
This repository includes a script to create a KiCad project, at
create_project.sh
,
to be called like this:
create_project.sh project_name
It will:
- Create a directory called
project_name
git init
if not already in a git repository- Add
cpavlina/kicad-schlib
andcpavlina/kicad-pcblib
as submodules, shallow-cloned to save space - Create the basic project files with all the libraries preloaded
The script doesn't depend on any other files in the repository, so you can download and run only the script itself without having to clone the repository yourself.
Yeah, I know a lot of people don't like submods, but I find them just about perfect for this application, for the following very important (IMHO) reason:
Submodules link to a specific commit. This is important when building a PCB. KiCad does not version libraries, so without doing this, the libraries could update underneath your project and introduce unnoticed errors. Using submodules ties your project to the parts you initially started using, and if you want to update (and have the time to review changes and make sure there are no errors), you can do this manually.
When cloning a project using submodules, it is normally required to use git clone --recursive
; note that because KiCad cache the library parts that have
actually been used, a project will still be readable if the libraries aren't
also cloned (and can be distributed without them for reference purposes).