https://github.com/leoheck/kiri
Kiri is a visual tool designed for reviewing schematics and layouts of KiCad projects that are version-controlled with Git.
https://github.com/leoheck/kiri
diff kicad kicad-5 kicad-6 kicad-7 kicad-8 kicad-cli kicad-diff kidiff kiri layout plotgitsch plotkicadsh schematic visual-diff
Last synced: 5 months ago
JSON representation
Kiri is a visual tool designed for reviewing schematics and layouts of KiCad projects that are version-controlled with Git.
- Host: GitHub
- URL: https://github.com/leoheck/kiri
- Owner: leoheck
- License: mit
- Created: 2021-03-14T23:09:51.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-04-02T12:11:55.000Z (7 months ago)
- Last Synced: 2025-04-14T22:19:46.732Z (6 months ago)
- Topics: diff, kicad, kicad-5, kicad-6, kicad-7, kicad-8, kicad-cli, kicad-diff, kidiff, kiri, layout, plotgitsch, plotkicadsh, schematic, visual-diff
- Language: Shell
- Homepage:
- Size: 4.55 MB
- Stars: 556
- Watchers: 13
- Forks: 38
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# KiCad Revision Inspector (KiRI)
KiRI started as a script to experiment having a visual diff tool for KiCad projects including schematics and layouts.
After some time, it became an interesting and it is still being updated.Currently, KiRi supports KiCad >= 5.
Internally it uses existing tools to generate svg images of schematics and layouts to be compared.
In this way, when exporting schematics, if:
- KiCad 7/8 is installed, the `kicad-cli` is used.
- KiCad 6 is installed (which does not have `kicad-cli` available), schematics are exported using [xdotool](https://github.com/jordansissel/xdotool) on Linux/Windows and [cliclick](https://github.com/BlueM/cliclick) on macOS, using the GUI. This method is far from the ideal and it is not recommended.
- KiCad 5 is installed or if the projects is based on KiCad 5, [plotkicadsch/plotgitsch](https://github.com/jnavila/plotkicadsch) are used to export the schematics.However, when exporting the layout layers:
- [Kicad-Diff](https://github.com/Gasman2014/KiCad-Diff) is used for all supported KiCad versions using `pcbnew` library available in python. It is also possible to use `kicad-cli` to export the layout layers however this process is slower than using Kicad-Diff.
## KiRI Installation
Check the Installation instructions, [here](INSTALL.md).
## Using KiRI
KiRI can be launched with the following command, anywhere, inside or outside of the repository of the project.
```bash
kiri [OPTIONS] [KICAD_PROJECT_FILE]
````KICAD_PROJECT_FILE` can be passed, but it can also be omitted. If running from inside the project's repository, it will use the `.pro` or `.kicad_pro` available. If both are present (which is not good), it will ask your choice. The same happens is running outside of the repository without passing the `KICAD_PROJECT_FILE`.
## Command line options (aka Help)
Command line flags can be seen using the `-h` flag
```bash
kiri -h
```### Archiving generated files
There is a possibility to archive generated files (check the help above).
To visualize generated files it is not necessary to have KiRI installed. You just have to unpack the generated package and then execute the web-server script (`./kiri-server`) inside of the folder, as shown below:
```bash
tar -xvzf kiri-2021.11.18-16h39.tgz
cd kiri
./kiri-server .
```# KiCad Integration
It is possible to integrate KiRI with PCBNew by adding a button to its toolbar with the following command:
```bash
# Create folder if it does not exist
mkdir -p "~/.kicad/scripting/plugins"# Copy the plugin there
cd ./kiri
cp -r "./kicad/plugin/kiri_v6/" "~/.kicad/scripting/plugins/kiri"
```# KiRI Screenshots
Browsing the schematic view walking through and comparing each page of the schematics, individually.
![]()
Browsing the layout view walking through and comparing each layer of the layout, individually.
![]()
Here is the comparison of the schematics when the project is updated from using KiCad 5 (`.sch`) to KiCad 6 (`.kicad_sch`).
![]()
Shortcuts are a really good way of walking through the commits, pages and layers quickly. Check the available shortcuts by hitting the shortcut `i`.
![]()
A quick and old demo on the Youtube.
---
Are you enjoying using this tool, feel free to pay me a beer :). Cheers!