go back Back

KiCad Integration

26 Sep 2023 Oliver

In the world of electronics design and PCB (Printed Circuit Board) development, KiCad has been a go-to tool for engineers and hobbyists alike. KiCad is a very popular and capable tool, and has continually evolved to meet the changing needs of its users.

Ever since InvenTree was first shamelessly cross-promoted on the KiCad forums, I have been searching for a clean way to connect KiCad and InvenTree together. This has been a popular topic of discussion with other InvenTree users too!

InvenTree contains all of my part definition data and inventory management information, such as part parameters, supplier data, etc. If only there was a simply way to get all of that information directly out of InvenTree and into KiCad.

Well now, with great excitement, there is! InvenTree data can now be used as a first-class symbol library - with full support of all of InvenTree’s internal data!

HTTP Library Support

In September 2023, HTTP Library Support was added to the KiCad application.

This feature allows KiCad library data to be retrieved from an external API endpoint, rather than a library file on the local filesystem. This is a groundbreaking change which allows us to leverage InvenTree’s existing capabilities to provide a fully-featured integration between the two software packages.

InvenTree Plugin

The same author who implemented the HTTP library support in KiCad has also released a plugin for InvenTree which provides an API wrapper for the InvenTree database that conforms to the KiCad HTTP library standard.

What does this mean? Simply put, it means that you can now use your InvenTree database as a native KiCad library, and pull your InvenTree data directly in to your KiCad schematic.

Configuration File

Once the plugin is installed, a simple configuration file on the local computer is all that is required to connect to the InvenTree database. All that is required is the URL to the remote server (with the correct plugin extension) and an API token for authentication:

{
    "meta": {
        "version": 1.0
    },
    "name": "InvenTree",
    "description": "InvenTree Library",
    "source": {
        "type": "REST_API",
        "api_version": "v1",
        "root_url": "http://my.inventree.server/plugin/kicad-library-plugin",
        "token": "usertokendatastring"
    }
}

Categories as Libraries

InvenTree categories can be used as separate libraries in the KiCad application. The InvenTree plugin allows the user to select which part categories are exposed to KiCad.

Parameters as Fields

Part parameters are exposed to the KiCad symbol as fields. This means that any extra part information (stored as part parameters in InvenTree) is available to the KiCad symbols.

Default Values

Where certain KiCad values are not defined for a particular part, each library category can optionally specify attributes such as Default Symbol or Default Footprint. This allows a category to be defined where all parts may share a common symbol and/or footprint within KiCad.

Further Reading

Check out the inventree-kicad-plugin page on GitHub for further details, including installation instructions!