{"id":37116307,"url":"https://github.com/clj/kom2","last_synced_at":"2026-01-14T13:38:30.521Z","repository":{"id":165749036,"uuid":"641157344","full_name":"clj/kom2","owner":"clj","description":"Interface KiCad database libraries with non-ODBC systems using magic","archived":false,"fork":false,"pushed_at":"2023-09-17T19:43:09.000Z","size":256,"stargazers_count":5,"open_issues_count":12,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-21T18:05:43.162Z","etag":null,"topics":["kicad","odbc"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-15T22:47:42.000Z","updated_at":"2023-10-20T01:49:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"6615100b-203f-4600-bb93-bca12ce935bd","html_url":"https://github.com/clj/kom2","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/clj/kom2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clj%2Fkom2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clj%2Fkom2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clj%2Fkom2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clj%2Fkom2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clj","download_url":"https://codeload.github.com/clj/kom2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clj%2Fkom2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28421439,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T13:30:50.153Z","status":"ssl_error","status_checked_at":"2026-01-14T13:29:08.907Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kicad","odbc"],"created_at":"2026-01-14T13:38:30.062Z","updated_at":"2026-01-14T13:38:30.504Z","avatar_url":"https://github.com/clj.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Prototype\n\nODBC to InvenTree prototype driver for KiCad.\n\nSee also: https://github.com/clj/kom for a previous prototype that uses SQLite virtual tables\n\n## Installing\n\n### macOS\n\nInstall [unixODBC](https://www.unixodbc.org)\n\n```shell\n$ brew install unixodbc\n```\n\nDownload the latest kicad-odbc-middleware2 release from [Releases](https://github.com/clj/kom2/releases):\n\n* For Intel based Macs:\n    * kicad-odbc-middleware2-**macos**-**amd64**-VERSION.zip\n* For Apple Silicon (ARM) Macs:\n    * kicad-odbc-middleware2-**macos**-**arm64**-VERSION.zip\n\ndecompress it and leave the kom2.dylib file somewhere convenient.\n\n### Linux\n\nContributions welcome.\n\n### Windows\n\nDownload the latest kicad-odbc-middleware2 Windows installer from [Releases](https://github.com/clj/kom2/releases) and run it.\n\n* For Intel/Amd based Windows PCs:\n  * kicad-odbc-middleware2-**windows**-**amd64**-VERSION.exe\n\n### KiCad Configuration\n\nCreate a `inventree.kicad_dbl` file with a valid configuration (see the [KiCad documentation on Database Libraries](https://docs.kicad.org/master/en/eeschema/eeschema.html#database-libraries)), e.g.:\n\n```json\n{\n    \"meta\": {\n        \"version\": 0\n    },\n    \"name\": \"InvenTree Library\",\n    \"description\": \"Components pulled from InvenTree\",\n    \"source\": {\n        \"type\": \"odbc\",\n        \"connection_string\": \"Driver=SEE_BELOW;username=reader;password=readonly;server=https://demo.inventree.org\",\n        \"timeout_seconds\": 2\n    },\n    \"libraries\": [\n        {\n            \"name\": \"Capacitors\",\n            \"table\": \"Electronics/Passives/Capacitors\",\n            \"key\": \"pk\",\n            \"symbols\": \"parameter.Symbol\",\n            \"footprints\": \"parameter.Footprint\",\n            \"fields\": [\n                {\n                    \"column\": \"IPN\",\n                    \"name\": \"IPN\",\n                    \"visible_on_add\": false,\n                    \"visible_in_chooser\": true,\n                    \"show_name\": true,\n                    \"inherit_properties\": true\n                },\n                {\n                    \"column\": \"parameter.Capacitance\",\n                    \"name\": \"Value\",\n                    \"visible_on_add\": true,\n                    \"visible_in_chooser\": true,\n                    \"show_name\": false\n                },\n                {\n                    \"column\": \"parameter.Package\",\n                    \"name\": \"Package\",\n                    \"visible_on_add\": true,\n                    \"visible_in_chooser\": true,\n                    \"show_name\": false\n                }\n            ],\n            \"properties\": {\n                \"description\": \"description\",\n                \"keywords\": \"keywords\"\n            }\n        }\n    ]\n}\n```\n\nThe InvenTree Demo server does not seem to have IPNs for everything though, so the key should probably be `pk` instead if that is the case (i.e. if IPN isn't unique).\n\n#### Connection String\n\nThe `Driver` argument of the connection string is used to find the kom2 driver and the exact value used is platform specific.\n##### Windows\n\nUse `Driver=kom2` when the driver was installed using the downloaded Windows installer.\n\n##### Linux\n\nUse `Driver=/path/to/kom2.so`, using the correct path where the driver was downloaded and extracted.\n\n##### macOS\n\nUse `Driver=/path/to/kom2.dylib`, using the correct path where the driver was downloaded and extracted.\n\n##### Other Connection String Options\n\n* `username`\n    * InvenTree username\n* `password`\n    * InvenTree users's password (not required if the `apitoken` is used instead)\n* `server`\n    * The InvenTree server to connect to\n* `apitoken`\n    * The optional API token (not required when `username` and `password` are used)\n\n### Add the library to KiCad:\n\n* *Preferences* -\u003e *Manage Symbol Libraries...*\n* Switch to the:\n    * *Global Libraries*; or\n    * *Project Specific Libraries*\n* Add a new library\n* Give it an appropriate *Nickname*\n* Set the *Library Path* to point to the `inventree.kicad_dbl` that you created earlier\n* Set the *Library Format* to *Database*\n\nYou can now open the Schematic Editor and add a new component. The configured library should now be available.\n\n## Interactive Use\n\nYou can query InvenTree using `isql` by using a connection string:\n\n```\nisql -v -k \"Driver=/.../kom2.dylib;username=reader;password=readonly;server=https://demo.inventree.org\"\n```\n\nand run things like:\n\n```\nselect * from Electronics/Passives/Resistors\n```\n\nor\n\n```\nselect * from Electronics/Passives/Resistors where pk = 43;\n```\n\nor\n\n```\nselect * from Electronics/Passives/Resistors where IPN = ???;\n```\n\nif there were IPNs in the DB.\n\n## License\n\nMIT License Copyright (c) 2023 Christian Lyder Jacobsen\n\nRefer to [LICENSE](./LICENSE) for full text.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclj%2Fkom2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclj%2Fkom2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclj%2Fkom2/lists"}