app
DigiKey Electronics Search
Public Made by Adomby adom
DigiKey component search in your workspace — millions of parts with real-time stock, quantity pricing and datasheets. CLI verbs, a Hydrogen app, and a shared backend service.
← Commit history
Publish 1.0.5
7 files changed
+79−92
README.md+30−78@@ -1,100 +1,52 @@-# DigiKey Electronics Search+# adom-digikey -**DigiKey's catalog — millions of parts, real-time stock and quantity pricing — one command away.**+DigiKey Electronics component search for the Adom ecosystem — one Rust binary, three modes: -+- **CLI verbs** — `adom-digikey search|part|health` for quick JSON-returning shell use.+- **Hydrogen webview app** — `adom-digikey app` opens a searchable UI as a first-class Hydrogen tab.+- **Backend HTTP service** — `adom-digikey serve` runs the shared proxy (port 8777) used by the `service-digikey` container. -`adom-digikey` is the single-vendor DigiKey tool for the Adom ecosystem — one Rust binary, three-faces:+Replaces the former `gallia/services/digikey/server.js` + `gallia/digikey/mcp/` setup. No MCP server, no Adom Viewer dependency. -- **CLI** — `adom-digikey search | part | health` for quick JSON-returning shell use and BOMs.-- **Hydrogen app** — `adom-digikey app` opens a searchable UI as a first-class Hydrogen tab.-- **Backend service** — `adom-digikey serve` runs the shared proxy (port 8777) that powers the- `service-digikey` container and feeds [`adom-parts-search`](/adom/adom-parts-search).--It replaces the old `service-digikey` + MCP setup: no MCP server.+## Quick start ```bash-adom-wiki pkg install adom-digikey-adom-digikey search "BME280"-```--## Real-time stock, straight to the bench--DigiKey shines when you need it *today*. Every card shows live stock, qty-1 price and the full-break ladder, lead time, RoHS and lifecycle — and DigiKey's deep catalog means the obscure sensor-or alt part is usually right there.----## Find the exact part, and its alternates--Search a function (`buck regulator 1A SOT-23`) or a precise MPN. DigiKey's parametric data lets the-cards surface the specs that actually drive a decision — Iq, Iout, Vin range, package — so the-substitute is one glance away when the first choice is out.----## Scriptable from the first keystroke+# One-shot search (auto-detects backend, or falls back to direct DigiKey call)+adom-digikey search "STM32F103RBT6" -`search` returns JSON; `part` fetches one MPN; `health` checks the backend's OAuth token. Pipe it-into `jq`, a BOM, or another Claude step.+# Interactive UI+adom-digikey app ---```bash-adom-digikey search "TPS62840DLCR" | jq '.components[0]'-adom-digikey part "296-TPS62840DLCRCT-ND"-adom-digikey health+# Run the backend on the service container+DIGIKEY_CLIENT_ID=<key> adom-digikey serve ``` -## Install--```bash-adom-wiki pkg install adom-digikey-```+See `SKILL.md` for the full command reference and typical workflows. -## How it works+## Architecture ```- any container service-digikey- $ adom-digikey search "BME280" ──POST──▶ adom-digikey serve (:8777)- $ adom-digikey app DIGIKEY_CLIENT_ID + OAuth- (Hydrogen webview tab) token-refresh + cache- │- ▼- api.digikey.com (v4)+┌─────────────────────────────────┐ ┌─────────────────────────┐+│ any container │ │ service-digikey │+│ │ │ │+│ $ adom-digikey search "ESP32" │───POST──▶│ adom-digikey serve │+│ $ adom-digikey app │ │ port 8777 │+│ (Hydrogen webview tab) │ │ DIGIKEY_CLIENT_ID set │+│ │ │ 10-min LRU cache │+└─────────────────────────────────┘ └─────────────────────────┘+ │+ ▼+ api.digikey.com (v2) ``` -The backend manages the DigiKey OAuth handshake and token refresh for you; the CLI auto-detects it-(or a local `:8777`). DigiKey is the go-to alternate when Mouser is out of stock or long-lead —-see how [`adom-parts-search`](/adom/adom-parts-search) flips the recommendation automatically.+Consumer containers point `DIGIKEY_API` at the service container's public URL; locally, the CLI will also autodetect `http://127.0.0.1:8777` if a backend is running on the same box. -## See also--- [`adom-parts-search`](/adom/adom-parts-search) — searches Mouser, DigiKey and JLCPCB at once and picks the best buy.--## Open source — make it yours, then give it back--This app is **open source under the MIT license**. Fork it, rewrite it, rename it, bend it to your-own workflow — and when you've made it better, **send your changes back to the Adom Wiki so the-whole community benefits**. Every wiki page is a git repo with a package registry on top, so-contributing back is first-class — improvements that land here ship to every Adom user who installs-the app.+## Build ```bash-adom-wiki pkg install adom-digikey # install it-# …edit the source to taste…-adom-wiki pkg publish # publish your own fork, or-# open a pull request against this page so the change lands for everyone+./build.sh # cargo build --release → copy to /usr/local/bin → adom-digikey install ``` -> **One caveat — the search backend is an Adom service.** The actual lookups run against-> Adom's hosted DigiKey backend (`service-digikey`), which uses **Adom's vendor API credentials and counts against Adom's quota**. That-> hosted backend is an Adom service and is **subject to change** — rate limits, endpoints, and-> availability can move at any time. Everything client-side (the CLI, the webview, the rendering-> and recommendation logic) is yours to fork and republish; the cloud API quota is not.- ## License -MIT © Adom — do what you want with the code, just pass it on.+MIT.
SKILL.md+1−1@@ -188,7 +188,7 @@ adom-digikey search "LM317" adom-digikey app # UI reads $DIGIKEY_API automatically ``` -Users don't need to set `DIGIKEY_API` explicitly — `adom-digikey` is a Tier A app (see `adom-app-model`), so it's installed by every `adompkg install` run from the registry. The CLI autodetects a local `adom-digikey serve` on 127.0.0.1:8777 and falls back to calling DigiKey directly if `DIGIKEY_CLIENT_ID` is set locally.+Gallia users don't need to set `DIGIKEY_API` explicitly — `adom-digikey` is a Tier A app (see `adom-app-model`), so it's installed by every `gallia/install.mjs` run from the wiki binary. The CLI autodetects a local `adom-digikey serve` on 127.0.0.1:8777 and falls back to calling DigiKey directly if `DIGIKEY_CLIENT_ID` is set locally. ### Local-only (quick testing)
bin/adom-digikey⋯ 1 unchanged line ⋯
package.json+29−2@@ -1,6 +1,6 @@ { "slug": "adom-digikey",- "version": "1.0.3",+ "version": "1.0.5", "type": "app", "description": "DigiKey component search in your workspace \u2014 millions of parts with real-time stock, quantity pricing and datasheets. CLI verbs, a Hydrogen app, and a shared backend service.", "dependencies": {},@@ -35,5 +35,32 @@ ], "hero": { "path": "screenshots/hero.png"- }+ },+ "discovery_triggers": [+ "digikey",+ "digikey parts",+ "digikey pricing",+ "digikey search",+ "digikey part number",+ "component search",+ "part lookup",+ "price breaks",+ "datasheet digikey",+ "in stock digikey"+ ],+ "discovery_pitch": "Search DigiKey Electronics for components, pricing, stock, and datasheets \u2014 CLI + webview app + shared backend service.",+ "sample_prompts": [+ {+ "label": "price a TPS62840 buck on DigiKey",+ "prompt": "price a TPS62840 buck on DigiKey"+ },+ {+ "label": "is the BME280 in stock at DigiKey",+ "prompt": "is the BME280 in stock at DigiKey"+ },+ {+ "label": "find a 1A buck regulator in SOT-23 on Di",+ "prompt": "find a 1A buck regulator in SOT-23 on DigiKey"+ }+ ] }
page.json+15−7@@ -4,7 +4,7 @@ "slug": "adom-digikey", "title": "DigiKey Electronics Search", "brief": "DigiKey component search in your workspace — millions of parts with real-time stock, quantity pricing and datasheets. CLI verbs, a Hydrogen app, and a shared backend service.",- "version": "1.0.4",+ "version": "1.0.5", "install": { "binary_name": "adom-digikey", "install_dir": "",@@ -35,24 +35,32 @@ "path": "screenshots/hero.png" }, "sample_prompts": [- "price a TPS62840 buck on DigiKey",- "is the BME280 in stock at DigiKey",- "find a 1A buck regulator in SOT-23 on DigiKey"+ {+ "label": "price a TPS62840 buck on DigiKey",+ "prompt": "price a TPS62840 buck on DigiKey"+ },+ {+ "label": "is the BME280 in stock at DigiKey",+ "prompt": "is the BME280 in stock at DigiKey"+ },+ {+ "label": "find a 1A buck regulator in SOT-23 on Di",+ "prompt": "find a 1A buck regulator in SOT-23 on DigiKey"+ } ], "discovery_triggers": [ "digikey",- "digi-key", "digikey parts", "digikey pricing", "digikey search", "digikey part number", "component search", "part lookup",- "real-time stock",+ "price breaks", "datasheet digikey", "in stock digikey" ],- "discovery_pitch": "Search DigiKey for millions of components with real-time stock, quantity pricing, and datasheets — CLI + Hydrogen webview app + shared backend service.",+ "discovery_pitch": "Search DigiKey Electronics for components, pricing, stock, and datasheets — CLI + webview app + shared backend service.", "metadata": { "platform": "linux" },
skills/adom-digikey-build/SKILL.md+3−3@@ -44,10 +44,10 @@ A release syncs five places to the same version X.Y.Z: curl -s https://digikey-<slug>.adom.cloud/health | jq '.version' # → "X.Y.Z" ``` -7. **Verify on a fresh user container** (optional, but catches install regressions):+7. **Verify on a fresh user container** (optional, but catches gallia regressions): ```bash # on a fresh container:- adompkg install --refresh # Tier A block fetches from the registry+ node ~/gallia/install.mjs # Tier A block fetches from wiki adom-digikey --version # → "adom-digikey X.Y.Z" ``` @@ -57,7 +57,7 @@ A release syncs five places to the same version X.Y.Z: - [ ] Wiki page at `apps/adom-digikey` renders the new `install_hint` one-liner - [ ] User has seen a working screenshot of the webview - [ ] No console errors via `GET /console`-- [ ] `adompkg install --refresh` still pulls + installs the new version (Tier A)+- [ ] `gallia/install.mjs` Tier A block still works (pulls + installs the new version) - [ ] **Brand audit — in-app icons are monochrome white.** Run: ``` grep -nE 'fill="#00b8b0"|stroke="#00b8b0"|color: var\(--accent\)' src/app/*.html src/app/*.svg 2>/dev/null
skills/adom-digikey/SKILL.md+1−1@@ -188,7 +188,7 @@ adom-digikey search "LM317" adom-digikey app # UI reads $DIGIKEY_API automatically ``` -Users don't need to set `DIGIKEY_API` explicitly — `adom-digikey` is a Tier A app (see `adom-app-model`), so it's installed by every `adompkg install` run from the registry. The CLI autodetects a local `adom-digikey serve` on 127.0.0.1:8777 and falls back to calling DigiKey directly if `DIGIKEY_CLIENT_ID` is set locally.+Gallia users don't need to set `DIGIKEY_API` explicitly — `adom-digikey` is a Tier A app (see `adom-app-model`), so it's installed by every `gallia/install.mjs` run from the wiki binary. The CLI autodetects a local `adom-digikey serve` on 127.0.0.1:8777 and falls back to calling DigiKey directly if `DIGIKEY_CLIENT_ID` is set locally. ### Local-only (quick testing)