{"id":50320639,"url":"https://github.com/noahdgrant/kicad-blocks","last_synced_at":"2026-05-29T03:04:50.396Z","repository":{"id":357254262,"uuid":"1236094653","full_name":"noahdgrant/kicad-blocks","owner":"noahdgrant","description":"Share schematic sheets across multiple KiCAD projects and reuse their PCB layouts.","archived":false,"fork":false,"pushed_at":"2026-05-12T02:13:54.000Z","size":85,"stargazers_count":0,"open_issues_count":10,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-12T03:14:46.210Z","etag":null,"topics":["cli","eda","electronics","hardware","kicad","kicad-plugin","pcb","pcb-design","pcb-layout","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/noahdgrant.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-12T00:17:19.000Z","updated_at":"2026-05-12T01:55:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/noahdgrant/kicad-blocks","commit_stats":null,"previous_names":["noahdgrant/kicad-blocks"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/noahdgrant/kicad-blocks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noahdgrant%2Fkicad-blocks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noahdgrant%2Fkicad-blocks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noahdgrant%2Fkicad-blocks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noahdgrant%2Fkicad-blocks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noahdgrant","download_url":"https://codeload.github.com/noahdgrant/kicad-blocks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noahdgrant%2Fkicad-blocks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33634615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cli","eda","electronics","hardware","kicad","kicad-plugin","pcb","pcb-design","pcb-layout","python"],"created_at":"2026-05-29T03:04:50.295Z","updated_at":"2026-05-29T03:04:50.383Z","avatar_url":"https://github.com/noahdgrant.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kicad-blocks\n\nShare schematic sheets across multiple KiCAD projects and reuse their PCB layouts.\n\n`kicad-blocks` is a CLI that lets you treat hierarchical schematic sheets as the source of truth for a section of a board (MCU subsystem, power, etc.) and replay that section's layout across multiple PCB projects. One MCU sheet, many boards — modular dev panels, all-in-one dev boards, space-constrained production boards — without copy-paste or DNP gymnastics.\n\n\u003e Status: pre-alpha. The v0.1 PRD lives at [issue #1](https://github.com/noahdgrant/kicad-blocks/issues/1) and the implementation slices at issues [#2–#13](https://github.com/noahdgrant/kicad-blocks/milestone/1).\n\n## What it does\n\nGiven KiCAD projects that share hierarchical schematic sheets (KiCAD 6+ instance-data model), `kicad-blocks` provides four commands:\n\n- **reuse** — copy a sheet's PCB layout (footprint placements, tracks, vias, zones, silkscreen) from a source PCB into a target PCB, anchored at a footprint refdes. Pass `--dry-run` to preview the planned placements without writing.\n- **sync** — re-apply after the source layout changes, with a dry-run diff and interactive confirmation.\n- **scaffold** — generate a new KiCAD project skeleton wired up to a chosen set of shared sheets.\n- **panelize-config** — emit a [KiKit](https://github.com/yaqwsx/KiKit) JSON config to panelize a set of modular PCBs.\n\nAfter a successful `reuse`, the plugin writes a `\u003cproject\u003e.kicad-blocks.lock.json` sidecar next to the config recording the source PCB hash, the applied block hash, the anchor refdes, and the plugin version. **Commit this file to git** — `sync` consults it to detect drift, and shipping it makes diffs reviewable across machines.\n\nEvery subcommand also accepts `--format json` for machine-readable output. The JSON envelope is versioned (`schema_version: 1`) and shared by success and failure cases, so a consumer can parse a single stream and branch on the top-level `ok` field. Errors travel as structured entries under `errors[]` on stdout, and exit codes match the default text mode.\n\n## Status\n\n- KiCAD 9 only (uses the modern instance-data schematic model)\n- Pure-Python S-expression parsing via [kiutils](https://github.com/mvnmgrx/kiutils)\n- MIT licensed\n\n## Install\n\n```sh\npipx install kicad-blocks\n```\n\n## Quick start: reuse and sync\n\nAssume you have two KiCAD projects sharing a hierarchical sheet `sheets/mcu.kicad_sch`: a fully-routed `mcu-module/` project that owns the canonical layout, and a `dev-board/` project that wants the same MCU section dropped in.\n\n1. **Scaffold the target project** (skip if you already have one):\n\n   ```sh\n   kicad-blocks scaffold --name dev-board --sheets ../sheets/mcu.kicad_sch\n   ```\n\n2. **Place the anchor footprint** in `dev-board/dev-board.kicad_pcb` — typically the MCU itself (e.g. `U1`) — at the position and rotation where you want the block to land. Save the board.\n\n3. **Write `dev-board/kicad-blocks.toml`**:\n\n   ```toml\n   [[blocks]]\n   source   = \"../mcu-module/mcu-module.kicad_pcb\"\n   sheet    = \"sheets/mcu.kicad_sch\"\n   anchor   = \"U1\"\n   ```\n\n4. **Validate the config** before touching the board:\n\n   ```sh\n   kicad-blocks validate\n   ```\n\n5. **Preview** the planned placement, then apply:\n\n   ```sh\n   kicad-blocks reuse --dry-run    # prints the items that would be placed\n   kicad-blocks reuse               # writes dev-board.kicad_pcb atomically\n   ```\n\n   A `dev-board.kicad-blocks.lock.json` sidecar appears next to your config — commit it.\n\n6. **Later, when the source layout changes**, re-sync:\n\n   ```sh\n   kicad-blocks sync --dry-run     # diff: added / removed / moved / net-rewired\n   kicad-blocks sync                # prompts before overwriting\n   ```\n\n   If `dev-board.kicad_pcb` was hand-edited *inside* the block region since the last apply, `sync` refuses and tells you to pass `--force` once you've reconciled the changes.\n\nFor a panel of modular PCBs, declare the `[panelize]` section of `kicad-blocks.toml` and emit a KiKit config with `kicad-blocks panelize-config --out panel.json`, then run KiKit yourself.\n\n## Reporting issues\n\nBug reports and feature requests welcome at the [issue tracker](https://github.com/noahdgrant/kicad-blocks/issues). Please include the KiCAD version, the `kicad-blocks` version, and a minimal reproducer where possible.\n\n## Contributing\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md) for development setup, the conventional commit format, and how to run the test/lint/typecheck stack locally.\n\n## License\n\nMIT — see [LICENSE](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoahdgrant%2Fkicad-blocks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoahdgrant%2Fkicad-blocks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoahdgrant%2Fkicad-blocks/lists"}