← Commit history

Add adompkg installer files

Kyle Bergstedt ·45091e7211 ·4mo ago ·parent 5ba35d1
4 files changed +126
SKILL.mdadded+96
@@ -0,0 +1,96 @@+---+name: service-kicad+description: >+  Shared headless KiCad service for every Adom tool and user container.+  Run DRC, ERC, export to SVG/Gerber/STEP/GLB, look up symbols,+  footprints, and 3D models — all via the `service-kicad` CLI.+  No local KiCad install needed.+  Trigger words: kicad service, service-kicad, kicad-cli remote,+  kicad DRC, kicad ERC, export gerbers, export step, export glb,+  kicad-packages3d, shared kicad library, headless kicad.+---++# service-kicad — shared headless KiCad++A shared KiCad 10 service running on a dedicated container. Every Adom+tool that needs KiCad operations (DRC, ERC, exports, library lookups)+shells to the `service-kicad` CLI instead of installing KiCad locally.++## Installation++Paste into Claude Code:++```+Install service-kicad. Download the binary from+https://wiki-ufypy5dpx93o.adom.cloud/static/apps/service-kicad/service-kicad+→ /tmp/service-kicad, chmod +x, sudo install to /usr/local/bin/service-kicad,+then run `service-kicad install` to deploy the skill + bash completions.+Verify with `service-kicad health`.+```++## When to use++**Always use the `service-kicad` CLI** — never curl the service URL+directly, and never `import` or `require` `kicad-api-client.js` from+Node.js scripts. The CLI has the production endpoint baked in and+insulates you from container reprovisions that change the URL.++```bash+# Good — shell to the CLI+service-kicad pcb drc board.kicad_pcb+service-kicad pcb export glb board.kicad_pcb -o board.glb+service-kicad sym svg Connector_Generic Conn_01x04++# Bad — hardcoded URL, breaks on reprovision+curl -X POST --data-binary @board.kicad_pcb https://...adom.cloud/kicad/pcb/drc++# Bad — JS client is for browser-only webviews, not Node.js+import { pcbDrc } from './kicad-api-client.js';+```++**Don't** apt-install `kicad` on your container just to render one SVG.++## CLI commands++```bash+# Diagnostics+service-kicad health+service-kicad version+service-kicad config++# PCB+service-kicad pcb drc board.kicad_pcb [--format json] [--out report.json]+service-kicad pcb export svg board.kicad_pcb [--out board.svg]+service-kicad pcb export gerbers board.kicad_pcb [--out ./gerbers/]+service-kicad pcb export step board.kicad_pcb [--out board.step]+service-kicad pcb export glb board.kicad_pcb [--out board.glb]++# Schematic+service-kicad sch erc schematic.kicad_sch [--format json]+service-kicad sch export svg schematic.kicad_sch [--out sch.svg]+service-kicad sch export pdf schematic.kicad_sch [--out sch.pdf]+service-kicad sch export bom schematic.kicad_sch [--out bom.csv]++# Symbol / footprint SVG+service-kicad sym svg LIBRARY NAME [--out symbol.svg]+service-kicad fp svg LIBRARY NAME [--out footprint.svg]++# 3D model download+service-kicad model fetch PATH [--out model.step]+```++## Troubleshooting++| Exit | Meaning | Fix |+|---|---|---|+| **0** | ok | — |+| **1** | input invalid | Check path + that file parses under kicad-cli |+| **2** | service unreachable | `service-kicad health` to confirm; the container may be restarting |+| **3** | auth failed (401/403) | `adom-cli auth refresh` |+| **4** | service-side error | CLI prints stderr; usually input-specific |++## Override URL (dev only)++```bash+export KICAD_SERVICE_API=http://127.0.0.1:8780+```
install.shadded+15
@@ -0,0 +1,15 @@+#!/bin/bash+set -e+PKG_DIR="$(cd "$(dirname "$0")" && pwd)"+SKILLS_DIR="$HOME/.claude/skills"+mkdir -p "$SKILLS_DIR/service-kicad"+if [ -f "$PKG_DIR/SKILL.md" ]; then+  cp "$PKG_DIR/SKILL.md" "$SKILLS_DIR/service-kicad/SKILL.md"+fi+for skill_dir in "$PKG_DIR/skills"/*/; do+  [ -d "$skill_dir" ] || continue+  skill_name=$(basename "$skill_dir")+  mkdir -p "$SKILLS_DIR/$skill_name"+  cp -r "$skill_dir"* "$SKILLS_DIR/$skill_name/"+done+echo "Installed service-kicad"
package.jsonadded+11
@@ -0,0 +1,11 @@+{+  "slug": "service-kicad",+  "version": "1.0.0",+  "type": "app",+  "description": "DRC, ERC, SVG/Gerber/STEP/GLB export, symbol/footprint/3D-model lookup. Every Adom tool shells to this CLI instead of calling the HTTP API directly.",+  "dependencies": {},+  "scripts": {+    "install": "./install.sh",+    "uninstall": "./uninstall.sh"+  }+}
uninstall.shadded+4
@@ -0,0 +1,4 @@+#!/bin/bash+set -e+rm -rf "$HOME/.claude/skills/service-kicad"+echo "Uninstalled service-kicad"