Guide
KiCad on GitHub: hosting, checking and releasing a board
GitHub is where most open-source KiCad projects live, and where many hardware teams already keep their firmware. It stores a KiCad project well, but it was built for source code: it does not draw your schematic or board. This guide sets up a KiCad repository on GitHub and adds the pieces that make it work for hardware: CI checks, exported outputs and tagged releases.
Looking for KiCad's own code?
KiCad itself is developed on GitLab, at gitlab.com/kicad/code/kicad, where its issues and contributions live. The KiCad organisation on GitHub hosts mirrors, such as KiCad/kicad-source-mirror, and a mirror of the official Docker images used in the workflow below. The rest of this page is about hosting your own KiCad project on GitHub.
Setting up the repository
- Create the repository in a GitHub organisation, not a personal account, if the board belongs to a company or a project: a repository in a personal account leaves with the person.
- Choose GitHub's KiCad .gitignore template when you create it, or add the .gitignore from the Git guide on this site.
- Put one KiCad project per folder: the .kicad_pro, every .kicad_sch, the .kicad_pcb, the library tables, and project-local symbol, footprint and 3D model libraries.
- Commit and push from KiCad's project manager (KiCad 9 and 10 have Git built in) or from any Git client.
- Open a fresh clone on another machine before you rely on it: the schematic, board and 3D view should load with no missing parts.
- Add a README with a picture of the board (an exported render or plot) and the current revision, since GitHub will not show the board itself.
What GitHub shows of a KiCad project
| On GitHub | What you get for KiCad files | How to do better |
|---|---|---|
| Viewing a file | The S-expression text of the .kicad_sch or .kicad_pcb, not a drawing. | Open public files in KiCanvas, a browser viewer that loads KiCad files from a GitHub URL, or publish PDFs from CI. |
| Commit and pull request diffs | Changed lines of text: coordinates, UUIDs, zone fills. | Visual diffs with KiRI or KiCad-Diff, run locally or in CI, and plots attached to the pull request. |
| History and blame | Works well: who changed which file, when, and why in the commit message. | Write commit messages that say what changed on the board, not only “update PCB”. |
| Issues and pull requests | Full support: discussion, review, required checks. | Make ERC and DRC a required check (below). |
| Releases | Tagged versions with files attached. | Attach the exact fab package for each order (below). |
KiCanvas describes itself as alpha software; check it renders your KiCad version's files before you send its links to reviewers.
GitHub Actions: ERC, DRC and fab outputs on every push
KiCad publishes official Docker images (kicad/kicad on Docker Hub) for running kicad-cli, its command-line tool. A workflow can run the electrical and design rule checks, fail when they find violations, and export a schematic PDF, Gerbers and drill files for every push and pull request. Replace board with your project's file names:
name: KiCad checks and outputs
on: [push, pull_request]
jobs:
kicad:
runs-on: ubuntu-latest
container:
image: kicad/kicad:10.0
options: --user root
steps:
- uses: actions/checkout@v4
- name: ERC
run: kicad-cli sch erc --exit-code-violations -o erc.rpt board.kicad_sch
- name: DRC
run: kicad-cli pcb drc --exit-code-violations -o drc.rpt board.kicad_pcb
- name: Export outputs
if: always()
run: |
mkdir -p out/gerbers
kicad-cli sch export pdf -o out/schematic.pdf board.kicad_sch
kicad-cli pcb export gerbers -o out/gerbers/ board.kicad_pcb
kicad-cli pcb export drill -o out/gerbers/ board.kicad_pcb
- uses: actions/upload-artifact@v4
if: always()
with:
name: kicad-outputs
path: |
out/
*.rpt- Pin the image tag to the KiCad version your team designs in, so CI checks the files the way your editor does.
- Check each command and option against the KiCad command-line documentation for your version; options change between major releases.
- Reviewers without KiCad download the artifact from the workflow run to read the schematic PDF and the reports.
- For BOMs, interactive BOMs, 3D renders and fabricator-specific packages from one config file, use KiBot, which publishes its own GitHub Action.
- In the repository's branch protection or rulesets, make this workflow a required check so a pull request cannot merge with ERC or DRC failing.
Releases: one per fab order
- When a board goes to fab, tag the commit with its revision, for example rev-b.
- Create a GitHub release from that tag.
- Attach the exact package you sent: the Gerber and drill zip, BOM, position file and schematic PDF, ideally the CI artifact built from that commit.
- Write what changed since the last revision in the release notes, so anyone can see why Rev B exists without reading diffs.
This keeps generated files out of day-to-day commits, where they drift out of date, while the files behind every board in the field stay one click away.
Large files and 3D models
- GitHub limits the size of files in regular repositories: it warns on large files, blocks files over 100 MiB, and limits files added through the browser further. GitHub's “About large files on GitHub” page has the current limits.
- STEP models are the files most likely to grow a KiCad repository. Track them with Git LFS (git lfs track "*.step" "*.stp" "*.wrl") before you commit them.
- Git LFS on GitHub has storage and bandwidth allowances that depend on your plan; check GitHub's billing docs for Git LFS before a team relies on it.
- Every clone and every CI run downloads LFS files too; in Actions, pass lfs: true to actions/checkout only in jobs that need the models.
Where GitHub stops, and what to add
With CI, releases and a viewer link, GitHub is a strong home for open-source hardware and for teams that review firmware in pull requests. Two gaps remain. People who sign off on a board without KiCad see only what your CI exports. And two branches that both changed the same .kicad_pcb rarely merge cleanly, so agree who edits the board at a time.
For the first gap, BoardRepo is the strongest addition: it imports public GitHub repositories by URL and private ones through its GitHub App, can follow the default branch, and shows each version's schematic, PCB, 3D view and BOM in a browser, with visual comparison between versions for signed-in readers. Code review stays in GitHub. BoardRepo has no pull requests and does not merge simultaneous CAD edits, which is why the two work best together.