app
KiCad - the KiCad Bridge
Public Made by Adomby adom
Reference implementation of the KiCad bridge: multi-instance Python server, forward path via kicad-cli, reverse path via in-process plugin. Most complex of the three bundled bridges.
← Commit history
README.md+68−27@@ -1,28 +1,27 @@-# Adom Desktop — KiCad Bridge+# Adom Bridge — KiCad Bridge -A **reverse bridge** that lets Adom Desktop (AD) — and the AI driving it — control the user's own+A **reverse bridge** that lets Adom Bridge (ab) — and the AI driving it — control the user's own KiCad on Windows: open and drive every editor, install symbol/footprint libraries, place parts, run DRC/ERC, export manufacturing files, and screenshot any window back to the AI. > ### Two artifacts on this page — which one do you want? >-> | | **Release ZIP** (`adom-bridge-kicad-v*.zip`) | **Package** (`adom-wiki pkg install adom/adom-desktop-kicad-bridge`) |+> | | **Release ZIP** (`adom-bridge-kicad-v*.zip`) | **Package** (`adom-wiki pkg install adom/kicad-bridge`) | > |---|---|---| > | What it is | The **bridge runtime** — the actual Python server that drives KiCad | **Skills + docs only**, for a container/agent |-> | Who loads it | **Adom Desktop** downloads it automatically via `adom-bridge-kicad-manifest.json` | You, into a container, to teach an agent the `kicad_*` verbs |+> | Who loads it | **Adom Bridge** downloads it automatically via `adom-bridge-kicad-manifest.json` | You, into a container, to teach an agent the `kicad_*` verbs | > | Contains | code, certs, UIA scripts, board template | `SKILL.md` files (no binaries, no images) |-> | You install it manually? | **No** — AD handles it | Yes |+> | You install it manually? | **No** — Bridge handles it | Yes | > > **The package is not the bridge.** Installing the package does not give you a working-> bridge; AD loading the release zip does. Both are kept deliberately small — the zip is-> auto-bundled into AD, so it ships only what the runtime needs.-+> bridge; Adom Bridge loading the release zip does. Both are kept deliberately small — the zip is+> auto-bundled into Adom Bridge, so it ships only what the runtime needs. KiCad is the user's **host app**. The bridge *detects* an existing KiCad and, if none is present, *installs* one for them — it never asks the user to download or click through anything by hand. -- **Page / docs:** https://wiki.adom.inc/adom/adom-desktop-kicad-bridge-- **Bridge SDK:** https://wiki.adom.inc/adom/adom-desktop-bridges+- **Page / docs:** https://wiki.adom.inc/adom/kicad-bridge+- **Bridge SDK:** https://wiki.adom.inc/adom/adom-bridge-sdk - **Verb namespace:** `kicad_*` · **Status verb:** `kicad_bridge_status` · **Health:** `GET /status` > Every screenshot in this README was captured on **ADOMBASELINE**, a stock Hyper-V VM with **no@@ -33,21 +32,63 @@ KiCad is the user's **host app**. The bridge *detects* an existing KiCad and, if ## Demo — narrated live editor tour (real screen recording) -[](https://wiki.adom.inc/blob/app/adom-desktop-kicad-bridge/kicad-bridge-demo.mp4)+[](https://wiki.adom.inc/blob/app/kicad-bridge/kicad-bridge-demo.mp4)++**▶ [Watch the demo](https://wiki.adom.inc/blob/app/kicad-bridge/kicad-bridge-demo.mp4)** (48s, 🔊 narrated) — the bridge driving real KiCad on a Windows VM: **select** a footprint and **zoom** the copper in the PCB editor, **rotate** the assembled board in 3D, then tour the schematic, symbol, and footprint editors. Genuine screen recording of the live windows (zoom / select / 3D rotation), narrated section by section — not animated stills. -**▶ [Watch the demo](https://wiki.adom.inc/blob/app/adom-desktop-kicad-bridge/kicad-bridge-demo.mp4)** (48s, 🔊 narrated) — the bridge driving real KiCad on a Windows VM: **select** a footprint and **zoom** the copper in the PCB editor, **rotate** the assembled board in 3D, then tour the schematic, symbol, and footprint editors. Genuine screen recording of the live windows (zoom / select / 3D rotation), narrated section by section — not animated stills. +---++## The demo verb — `kicad_demo`++One verb that shows the whole bridge off, built for the AI that demos Adom Bridge+during Hydrogen's install. Six beats, in the order a hardware person thinks:++| Beat | Shows |+|---|---|+| 1 | the **schematic symbol** in the user's own Symbol Editor |+| 2 | the **footprint** for that same part |+| 3 | that part in **3D** |+| 4 | a **schematic** using it (U1 + two 10k resistors) |+| 5 | the **2D board layout** |+| 6 | the finished **board in 3D** |++```bash+adom-desktop kicad_demo '{}' # start: prepares, warms KiCad, opens beat 1+adom-desktop kicad_demo '{"step":"footprint"}' # ...then follow data.nextCall each time+adom-desktop kicad_demo '{"all":true}' # bulk (non-interactive; slower than one request budget)+adom-desktop kicad_close '{"force":true}' # tear down+```++**It narrates itself.** Every beat returns `say` (a line to speak), `pointOut`+(what's actually on screen), `window` (match it in `kicad_screenshot_all`) and+`nextCall`. One beat per call is the default precisely so the AI can talk, screenshot,+then move on.++**It ships nothing.** The two demo parts, the schematic and the board are all+generated in code, and the 3D bodies come from KiCad's *own* bundled+`3dmodels/*.3dshapes` — so the runtime zip stays small and the 3D views are real.+Parts install into the user's real `Adom` library; the project lands in+`Documents/adom-kicad-demo`.++**No KiCad? It offers to install it.** `kicad_demo` returns an offer instead of an+error; `kicad_demo '{"installKiCad": true}'` silently installs the official build+(per-user, no UAC) and then runs the tour. Watching the AI install your EDA tool is+itself a good demo beat.++**It never takes your screen.** Every window opens in the background and all input is+window-targeted (UIA / `PostMessage`), so you can keep working while it runs. --- ## How it fits together -The bridge is a `spawn.kind: python` process AD launches on the user's machine (`entrypoint:-server.py`, `port: 0` — AD picks the port and passes `ADOM_BIND_HOST`). It speaks HTTP+The bridge is a `spawn.kind: python` process Bridge launches on the user's machine (`entrypoint:+server.py`, `port: 0` — Bridge picks the port and passes `ADOM_BIND_HOST`). It speaks HTTP (`POST /command`, `GET /status`) and reaches KiCad through **four control surfaces**, picking the lightest one that can do the job. -+ | # | Surface | Used for | Where | |---|---------|----------|-------|@@ -67,33 +108,33 @@ generated by `tour-pack-rp2040/` (an `AdomRP2040` symbol + `QFN-56_AdomRP2040` f The RP2040 breakout: the MCU (U1), USB-C, a 12 MHz crystal, decoupling, and mounting pins. -+ ### Symbol editor — `kicad_open_symbol_editor` Opens straight to a symbol (`kicad_install_symbol` puts it in a user library first). -+ ### Footprint editor — `kicad_open_footprint_editor` `{"footprintName":"QFN-56_AdomRP2040","library":"AdomRP2040"}` loads the part directly — 56 pins + thermal pad, 7×7 mm, 0.4 mm pitch, courtyard and silkscreen. -+ ### PCB editor (2D) — `kicad_open_board` The routed breakout — copper, silkscreen, the QFN-56 land pattern, mounting holes. -+ ### 3D viewer — `kicad_open_3d_viewer {"editor":"pcb"}` The full board in 3D — board body, the USB-C connector's 3D model, the QFN chip body, SMD parts, plated through-holes. **Rendered on the CPU via the software-OpenGL fallback (below); reload 1.7 s.** -+ --- @@ -102,14 +143,14 @@ plated through-holes. **Rendered on the CPU via the software-OpenGL fallback (be The bridge never tells the user to go download KiCad. `kicad_upgrade` fetches the official installer and runs it silently, picking the scope automatically: -- **Elevated AD** → `/allusers /S` (system-wide, `%ProgramFiles%\KiCad`).-- **Non-elevated AD** → `/currentuser /S` (`%LocalAppData%\Programs\KiCad`, **no UAC prompt**).+- **Elevated Bridge** → `/allusers /S` (system-wide, `%ProgramFiles%\KiCad`).+- **Non-elevated Bridge** → `/currentuser /S` (`%LocalAppData%\Programs\KiCad`, **no UAC prompt**). `kicad_readiness` reports whether KiCad is installed and ready without side effects; the AI routes on it before offering to install. Hard-won install details (all handled for you): - KiCad 10's NsisMultiUser installer **requires** a scope flag — bare `/S` errors `rc=666660`.-- AD's portable Python has **no CA bundle**; the bridge ships `certs/cacert.pem` and uses it for TLS.+- Bridge's portable Python has **no CA bundle**; the bridge ships `certs/cacert.pem` and uses it for TLS. - Downloads are size-checked against `Content-Length` (a truncated installer otherwise fails at NSIS). - `%APPDATA%/kicad/<ver>/` lib tables don't exist until first launch — the bridge **bootstraps** them so `install_library`/`install_footprint` work on a never-opened KiCad.@@ -129,7 +170,7 @@ Auto-expired benign dialogs include: - **"Welcome to KiCad — starting for the first time"** first-run wizard (dismissing accepts defaults). - **"This file was created by an older version of KiCad"** conversion notice. -+ Verbs: @@ -176,13 +217,13 @@ related verbs, and pitfalls. ## Running / dependencies -AD provisions everything; there is nothing to install by hand.+Bridge provisions everything; there is nothing to install by hand. -- **Python** ≥ 3.11 (AD provisions it) — stdlib only, plus the bundled `certs/cacert.pem`.+- **Python** ≥ 3.11 (Bridge provisions it) — stdlib only, plus the bundled `certs/cacert.pem`. - **KiCad** ≥ 7.0 (host app; `kicad_upgrade` installs it if absent). - **OS:** Windows (macOS/Linux detection stubs exist; the GUI surfaces are Windows-first). -The bridge binds `ADOM_BIND_HOST` on an AD-assigned port — never `0.0.0.0`. Auto-updates via+The bridge binds `ADOM_BIND_HOST` on a Bridge-assigned port — never `0.0.0.0`. Auto-updates via `updateManifestUrl` in `bridge.json`. ---
package.json+10−1@@ -1,6 +1,6 @@ { "slug": "kicad-bridge",- "version": "1.0.21",+ "version": "1.0.22", "type": "app", "description": "Skills for your container so your AI knows how to drive the KiCad bridge. The bridge runtime itself is the release zip; Adom Bridge loads that.", "tags": [@@ -32,5 +32,14 @@ "skills/kicad-bridge-publish/SKILL.md", "skills/kicad-bridge-hero/SKILL.md", "skills/kicad-bridge-hero/compose_hero.py"+ ],+ "keywords": [+ "kicad",+ "pcb",+ "schematic",+ "eda",+ "bridge",+ "ab",+ "adom-bridge" ] }
page.json+12−4@@ -4,15 +4,14 @@ "slug": "kicad-bridge", "title": "KiCad - the KiCad Bridge", "brief": "Reference implementation of the KiCad bridge — multi-instance Python server, forward path via kicad-cli, reverse path via in-process plugin. Most complex of the three bundled bridges.",- "version": "1.0.21",+ "version": "1.0.22", "tags": [ "kicad", "pcb", "schematic", "eda", "bridge",- "ab",- "adom-bridge"+ "adom-desktop" ], "license": "MIT", "discovery_triggers": [@@ -127,5 +126,14 @@ "skills/kicad-bridge-hero/compose_hero.py" ], "org": "adom",- "name": "kicad-bridge"+ "name": "kicad-bridge",+ "keywords": [+ "kicad",+ "pcb",+ "schematic",+ "eda",+ "bridge",+ "ab",+ "adom-bridge"+ ] }