{"id":13594360,"url":"https://github.com/productize/kicad-automation-scripts","last_synced_at":"2026-03-17T21:42:24.475Z","repository":{"id":31192062,"uuid":"127175331","full_name":"productize/kicad-automation-scripts","owner":"productize","description":"A bunch of scripts to automate KiCad processes","archived":false,"fork":false,"pushed_at":"2022-04-22T22:03:05.000Z","size":105,"stargazers_count":86,"open_issues_count":13,"forks_count":46,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-08-02T16:51:59.548Z","etag":null,"topics":["automation","dodays","kicad"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/productize.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}},"created_at":"2018-03-28T17:29:37.000Z","updated_at":"2024-06-03T04:45:34.000Z","dependencies_parsed_at":"2022-09-24T08:53:06.133Z","dependency_job_id":null,"html_url":"https://github.com/productize/kicad-automation-scripts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/productize%2Fkicad-automation-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/productize%2Fkicad-automation-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/productize%2Fkicad-automation-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/productize%2Fkicad-automation-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/productize","download_url":"https://codeload.github.com/productize/kicad-automation-scripts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223375312,"owners_count":17135347,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["automation","dodays","kicad"],"created_at":"2024-08-01T16:01:32.331Z","updated_at":"2026-03-17T21:42:24.425Z","avatar_url":"https://github.com/productize.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"KiCad automation scripts\n========================\n\nA bunch of scripts to automate [KiCad] processes using a combination of the\nPCBNew Python library and UI automation with [xdotool].\n\nThis work is based in big parts on Scott Bezek's scripts in his\n[split-flap display project][split-flap].\nFor more info see his [excellent blog posts][scot's blog].\n\nCurrently tested and working:\n\n- Exporting schematics to PDF and SVG\n- Exporting layouts to PDF and SVG\n- Running ERC on schematics\n- Running DRC on layouts\n\n## Versions\n\nThis repository has a branch per supported major KiCad version, prefixed with\n`kicad-`. Note that installation instructions and supported features can be\ndifferent per version.\n\nThe master branch and latest Docker tag will always be the latest supported\nstable KiCad version.\n\n## Installation\n\n### Using Docker\n\nBuild and run the docker image:\n\n```\ndocker build -t kicad-automation-scripts .\ndocker run --rm -it -v \u003cpath to a kicad project\u003e:/kicad-project kicad-automation-scripts\n```\n\nOr fetch it from [Dockerhub]:\n\n```\ndocker run --rm -it -v \u003cpath to a kicad project\u003e:/kicad-project productize/kicad-automation-scripts\n```\n\n### Installation on your own machine:\n\nIf you want to use these scripts directly on your system, you should be able to\nget it to work by installing the folowing dependencies:\n\nThis tool has the following dependencies:\n- KiCad\n- python\n- python-pip\n- xvfb\n- recordmydesktop\n- xdotool\n- xclip\n\nThe Python dependencies (excluding KiCad) are listed in\n[eeschema/requirements.txt][eeschema/requirements.txt] and can be installed with\n\n```\npip install -r eeschema/requirements.txt\n```\n\n### Installation on Ubuntu/Debian:\n\n```\nsudo apt-get install -y kicad python python-pip xvfb recordmydesktop xdotool xclip\n```\n\n## Usage\n\nIn the Docker image or on a system with all required dependencies installed you\ncan use the following commands:\n\n### Run schematic ERC:\n\n```\npython -m kicad-automation.eeschema.schematic run_erc /kicad-project/\u003csome-schematic\u003e.sch \u003cbuild_dir\u003e\n```\n\nAdd the flag `--warnings_as_errors` to make all warnings also return an error code of `1`.\n\n### Export a schematic to PDF or SVG\n\n```\npython -m kicad-automation.eeschema.schematic export /kicad-project/\u003csome-schematic\u003e.sch \u003cbuild_dir\u003e \u003csvg or pdf\u003e \u003call-pages (True or False)\u003e\n```\n\n### Run layout DRC:\n\n```\npython -m kicad-automation.pcbnew_automation.run_drc /kicad-project/\u003csome-layout\u003e.kicad_pcb \u003cbuild_dir\u003e\n```\n\n### Generate a zip file with gerber files for PCB manufacuring:\n\n```\npython -m kicad-automation.pcbnew_automation.plot /kicad-project/\u003csome-layout\u003e.kicad_pcb \u003cplot_dir\u003e [\u003clayers to plot\u003e]\n```\n\n### Generate a pdf with the layout layers and drill map file:\n\n```\npython -m kicad-automation.pcbnew_automation.plot -f pdf /kicad-project/\u003csome-layout\u003e.kicad_pcb \u003cplot_dir\u003e [\u003clayers to plot\u003e]\n```\n\n## Hacking\n\nIf you want to test the scripts in this repository and run them inside a docker\nimage, the base image can be used. This base image contains all the required\ndependencies and the required environment for the script to work.\n\nTo build and run the base image:\n\n```\ndocker build -f Dockerfile-base -t kicad-automation-base .\ndocker run --rm -it -v \u003cpath to a kicad project\u003e/kicad-project  -v `pwd`/src:/usr/lib/python2.7/dist-packages/kicad-automation kicad-automation-base\n```\n\nOr fetch it from [Dockerhub]:\n\n```\ndocker run --rm -it -v \u003cpath to a kicad project\u003e:/kicad-project -v `pwd`/src:/usr/lib/python2.7/dist-packages/kicad-automation productize/kicad-automation-base\n```\n\nThe scripts can now be used the same way as in the main image, but changes\non the host will automatically be reflected on the container (though note\nthat Python does not autoreload libraries).\n\n[KiCad]: http://kicad-pcb.org/\n[xdotool]: https://github.com/jordansissel/xdotool\n[split-flap]: https://github.com/scottbez1/splitflap\n[scot's blog]: https://scottbezek.blogspot.be/2016/04/scripting-kicad-pcbnew-exports.html\n[Dockerhub]: https://hub.docker.com/r/productize/kicad-automation-scripts\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproductize%2Fkicad-automation-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fproductize%2Fkicad-automation-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproductize%2Fkicad-automation-scripts/lists"}