app
Parts Search
Public Made by Adomby adom
One search box across Mouser, DigiKey and JLCPCB: parallel queries, side-by-side product photos, and a Mouser-preferred recommendation that reasons around stock and lead time.
← Commit history
Publish 1.0.13
7 files changed
+129−145
README.md+59−81@@ -1,112 +1,90 @@-# Adom Parts Search+# adom-parts-search -**One search box. Mouser, DigiKey and JLCPCB at once — with the fastest, cheapest pick chosen for you.**+Unified parts search across **Mouser + DigiKey + JLCPCB**. One Rust binary, CLI + Hydrogen webview.+Fires three parallel queries, normalizes the responses, and picks a single winner using the Adom+Mouser-preferred policy (40-min drone delivery from Mansfield, TX → our Fort Worth facility;+near-zero shipping). -Sourcing a part used to mean three browser tabs, three logins, three different ways of saying "in-stock," and a mental spreadsheet to figure out who actually gets it to your bench fastest. Adom-Parts Search collapses that into one query: type a part — or just ask Claude — and it fires three-parallel searches, normalizes the answers, and names the single best place to buy.+ ## Install +Every gallia container picks this up as a Tier A install. Manual install:+ ```bash-adompkg install adom-parts-search+curl -fsSL https://wiki-ufypy5dpx93o.adom.cloud/static/apps/adom-parts-search/adom-parts-search \+ -o /tmp/adom-parts-search && chmod +x /tmp/adom-parts-search && \+ sudo install -m 0755 /tmp/adom-parts-search /usr/local/bin/adom-parts-search && \+ adom-parts-search install ``` -## Quick start+## Usage ```bash-# Browse — opens/refreshes the Parts Search Hydrogen tab + prints results-adom-parts-search show "STM32F103RBT6"+# User-facing — drives the webview tab + prints full per-vendor results to stdout+adom-parts-search show "LM555"+adom-parts-search show "ESP32-S3-WROOM-1U-N4R2" --limit 8 --in-stock-only -# Script — JSON only, no webview-adom-parts-search search "LM555" | jq '.recommendation'+# Scripting / pipe — JSON only, no webview+adom-parts-search search "STM32F103RBT6" | jq '.recommendation' -# Keep the app tab alive without a query+# Keep the app tab running without a query adom-parts-search app ``` -## Screenshots--### Three distributors, one comparable view-One keyword goes to Mouser, DigiKey and JLCPCB simultaneously; results land in three aligned-columns with product photos, and a recommendation banner names the winner.----### A recommendation that actually reasons-The winner isn't always Mouser. When Mouser is out of stock, long-lead, or NRND, the policy steps-aside and points you at whoever can ship today.----### Built for scripts and BOMs-`search` returns clean JSON for `jq`, BOM tooling, or another Claude step.--+The `show` subcommand auto-starts the app server on first call and opens a **Parts Search**+Hydrogen tab; subsequent calls reuse the same server + tab and re-render the 3-column grid in+place. -## Dependencies+## Architecture -| Dependency | Required? | Why |-|---|---|---|-| `adom-mouser` (service-mouser) | Recommended | Mouser column + the Mouser-preferred recommendation |-| `adom-digikey` (service-digikey) | Recommended | DigiKey column + the fallback when Mouser can't ship |-| `adom-jlcpcb` (service-jlcpcb) | Optional | JLCPCB assembly-library column |+This app is **client-only** — no service container. It coordinates the three existing vendor+backends: -Client-only — it owns no API keys and runs no service of its own; it federates the three vendor-backends and renders. At least one backend must be reachable; missing ones show a friendly error-and the recommendation reasons around them.--## Features--- **One interface, three distributors** — parallel queries, side-by-side product photos.-- **Mouser-preferred routing** — 40-min drone delivery from Mansfield, TX to our Fort Worth- facility + ~$0 shipping is why Mouser wins when it's in stock.-- **A recommendation that flips** — DigiKey wins on Mouser out-of-stock / long-lead / NRND.-- **Two faces** — a Hydrogen webview for browsing, a JSON CLI for scripting and BOMs.-- **Graceful degradation** — a rate-limited or down backend never fails the whole search.+```+ any container+ │+ ▼+ adom-parts-search show "…"+ │ (3 parallel HTTP POSTs)+ ├──▶ mouser-xr8t4f5d01bt.adom.cloud (adom-mouser)+ ├──▶ digikey-gjuu8l5t69uh.adom.cloud (adom-digikey)+ └──▶ jlcpcb-wela51osctvp.adom.cloud (adom-jlcpcb)+``` -## Talk to the AI+Each vendor backend handles its own auth, caching, quota tracking, and watchdog restart. This+app only aggregates, applies the Mouser-preferred recommendation, and renders. -Sourcing / comparison:-- "source an STM32F103RBT6"-- "where can I get an ESP32-S3-WROOM cheapest and fastest"-- "compare Mouser, DigiKey and JLCPCB for an LM555"-- "check stock for a USB-C receptacle across distributors"+### Recommendation policy -BOM:-- "price this BOM across distributors"-- "which of these parts is cheapest to assemble at JLCPCB"+1. **Mouser wins** if it has an in-stock hit without a 280+-day lead time — drone delivery ++ $0 shipping beats everything else within a 15-mile radius.+2. **DigiKey wins** if Mouser is out-of-stock or long-lead, and DigiKey has immediate stock.+3. **JLCPCB** is shown as a library column but does not participate in the recommendation+ (it's assembly-first; different workflow). -## Skills+When all three return zero hits or errors, the recommendation card flips into an+**empty-state** explainer with a suggested next step (try a canonical MPN from the skill's+family table, or retry once erroring backends recover). -| Skill | Purpose |-|---|---|-| `adom-parts-search` | When/how Claude drives the app — `show` vs `search`, MPN extraction, part-family corrections |-| `adom-parts-search-build` | Release workflow (build, publish to the wiki) |+## Skill + build skill -## CLI reference+- [SKILL.md](SKILL.md) — how Claude drives this app (when to use `show` vs `search`, MPN+ extraction rules, common part-family corrections).+- [BUILD-SKILL.md](BUILD-SKILL.md) — release workflow (`./publish.sh`). -| Command | What it does |-|---|---|-| `adom-parts-search show "<q>"` | Open/refresh the Parts Search tab + print full per-vendor results |-| `adom-parts-search search "<q>"` | JSON only (no webview) — pipe to `jq` |-| `adom-parts-search app` | Keep the app tab running without a query |-| `--limit N` / `--in-stock-only` | Cap hits per vendor / hide zero-stock |+Per [adom-cli-design], the skills are hosted on the wiki and fetched at install time; the+bundled copies in the binary are fallbacks for offline installs only. -## Open source — make it yours, then give it back+[adom-cli-design]: https://github.com/adom-inc/gallia/blob/main/skills/adom-cli-design/SKILL.md -This app is **open source under the MIT license**. Fork it, rewrite it, bend it to your 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 `adompkg publish` your-own fork, or open a pull request against this page.+## Build -> **One caveat — the search backend is an Adom service.** The actual lookups run against Adom's-> hosted Mouser, DigiKey and JLCPCB backends, which use Adom's vendor API credentials and count-> 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 is yours to fork-> and republish; the cloud API quota is not.+```bash+./build.sh # cargo build --release + install to /usr/local/bin + adom-parts-search install+./publish.sh # git tag + gh release + wiki asset upload + wiki page update+``` ## License -MIT © Adom — do what you want with the code, just pass it on.+MIT.
SKILL.md+5−22@@ -7,23 +7,6 @@ description: Unified parts search across Mouser + DigiKey + JLCPCB with Mouser-p Searches Mouser + DigiKey + JLCPCB in parallel. Rust CLI + Hydrogen webview. Recommends **Mouser by default** because our Fort Worth facility has a 40-minute drone delivery arrangement with Mouser's Mansfield, TX fulfillment center + near-zero shipping cost. --## Displaying this app (REQUIRED — read before showing anything)--To SHOW this app to the user, use `adom-parts-search show` (it opens the proper Hydrogen-webview tab itself). If you ever need to open the app UI manually, FIRST load the-`webview` skill (from adom-workspace-control) and follow it.--- **NEVER open this app in VS Code's "Simple Browser"** — that is NOT what "webview" means- in the Adom ecosystem. Simple Browser has no live channel, no console read-back, and no- AI drivability; using it is a bug.-- The Adom surfaces for showing an app are: **wv** — a Hydrogen webview panel (load the- `webview` skill from adom-workspace-control and follow it; inside HD this is HD's pane- tab), **pup** — a pup window (`pup` skill), **nb** — the user's real signed-in browser (Adom browser- extension), and **hdbw** — HD's standalone built-in Tauri browser window- (picker: "HD Browser Window", destination id `webview-window`, only under Hydrogen- Desktop). Pick per the situation; Simple Browser is NEVER one of them.- ## CLI **For user-facing searches, always use `show`.** It drives the webview tab AND prints the full vendor-by-vendor result to stdout, so the user sees product photos + 3-column comparison and the AI sees the same data textually. Auto-starts the app server + opens the tab on first run.@@ -153,7 +136,7 @@ parts-search was mixing two unrelated concerns. Install one-liner (paste-into-Claude style): ```bash-curl -fsSL https://wiki.adom.inc/static/apps/adom-chipfit/adom-chipfit \+curl -fsSL https://wiki-ufypy5dpx93o.adom.cloud/static/apps/adom-chipfit/adom-chipfit \ -o /tmp/adom-chipfit && chmod +x /tmp/adom-chipfit \ && sudo install -m 0755 /tmp/adom-chipfit /usr/local/bin/adom-chipfit \ && adom-chipfit install@@ -171,7 +154,7 @@ picks it up. ## Why Mouser is preferred -See the companion `adom-parts-search` skill for the full policy. Short version:+See the companion skill `adom-parts-search` (the gallia one) for the full policy. Short version: - **40-minute drone delivery** (Mansfield TX → Fort Worth TX, ~15 miles) - **Near-zero shipping cost** (drone route, Mouser-operated)@@ -185,7 +168,7 @@ The three vendor backends are Tier A services. Current URLs: - DigiKey: `https://digikey-gjuu8l5t69uh.adom.cloud` - JLCPCB: `https://jlcpcb-wela51osctvp.adom.cloud` -Override with `--mouser-api` / `--digikey-api` / `--jlcpcb-api`, or env vars `MOUSER_API` / `DIGIKEY_API` / `JLCPCB_API`. Canonical source of truth for current slugs is `~/service-watcher/services.json` on the main service container.+Override with `--mouser-api` / `--digikey-api` / `--jlcpcb-api`, or env vars `MOUSER_API` / `DIGIKEY_API` / `JLCPCB_API`. Canonical source of truth for current slugs is `~/service-watcher/services.json` on the main gallia container. ## Architecture @@ -193,10 +176,10 @@ This app is **client-only** — no service container of its own. It coordinates ## Install -Tier A — fetched by `adompkg install` in a fresh user container. Or manually:+Tier A — fetched by `gallia/install.mjs` on every gallia container. Or manually: ```bash-curl -fsSL https://wiki.adom.inc/static/apps/adom-parts-search/adom-parts-search \+curl -fsSL https://wiki-ufypy5dpx93o.adom.cloud/static/apps/adom-parts-search/adom-parts-search \ -o /tmp/adom-parts-search && chmod +x /tmp/adom-parts-search && \ sudo install -m 0755 /tmp/adom-parts-search /usr/local/bin/adom-parts-search && \ adom-parts-search install
bin/adom-parts-search⋯ 1 unchanged line ⋯
package.json+33−2@@ -1,6 +1,6 @@ { "slug": "adom-parts-search",- "version": "1.0.12",+ "version": "1.0.13", "type": "app", "description": "One search box across Mouser + DigiKey + JLCPCB. Parallel queries, side-by-side product photos, and a Mouser-preferred recommendation (40-min drone delivery to Fort Worth) that reasons around stock and lead time.", "dependencies": {@@ -40,5 +40,36 @@ ], "hero": { "path": "screenshots/hero.png"- }+ },+ "discovery_triggers": [+ "parts-search",+ "parts-search parts",+ "parts-search pricing",+ "parts-search search",+ "parts-search part number",+ "component search",+ "part lookup",+ "price breaks",+ "datasheet parts-search",+ "in stock parts-search"+ ],+ "discovery_pitch": "Search Parts Search Electronics for components, pricing, stock, and datasheets \u2014 CLI + webview app + shared backend service.",+ "sample_prompts": [+ {+ "label": "source an STM32F103RBT6",+ "prompt": "source an STM32F103RBT6"+ },+ {+ "label": "where can I get an ESP32-S3-WROOM cheape",+ "prompt": "where can I get an ESP32-S3-WROOM cheapest and fastest"+ },+ {+ "label": "compare Mouser, DigiKey and JLCPCB for a",+ "prompt": "compare Mouser, DigiKey and JLCPCB for an LM555"+ },+ {+ "label": "price this BOM across distributors",+ "prompt": "price this BOM across distributors"+ }+ ] }
page.json+28−19@@ -4,7 +4,7 @@ "slug": "adom-parts-search", "title": "Adom Parts Search", "brief": "One search box across Mouser + DigiKey + JLCPCB. Parallel queries, side-by-side product photos, and a Mouser-preferred recommendation (40-min drone delivery to Fort Worth) that reasons around stock and lead time.",- "version": "1.0.12",+ "version": "1.0.13", "install": { "binary_name": "adom-parts-search", "install_dir": "",@@ -34,27 +34,36 @@ "path": "screenshots/hero.png" }, "sample_prompts": [- "source an STM32F103RBT6",- "where can I get an ESP32-S3-WROOM cheapest and fastest",- "compare Mouser, DigiKey and JLCPCB for an LM555",- "price this BOM across distributors"+ {+ "label": "source an STM32F103RBT6",+ "prompt": "source an STM32F103RBT6"+ },+ {+ "label": "where can I get an ESP32-S3-WROOM cheape",+ "prompt": "where can I get an ESP32-S3-WROOM cheapest and fastest"+ },+ {+ "label": "compare Mouser, DigiKey and JLCPCB for a",+ "prompt": "compare Mouser, DigiKey and JLCPCB for an LM555"+ },+ {+ "label": "price this BOM across distributors",+ "prompt": "price this BOM across distributors"+ } ], "discovery_triggers": [- "parts search",- "find part",- "source component",- "source part",- "compare distributors",- "compare vendors",- "Mouser or DigiKey",- "BOM sourcing",- "price this part",- "where can I get",- "check stock",- "parts availability",- "fastest delivery"+ "parts-search",+ "parts-search parts",+ "parts-search pricing",+ "parts-search search",+ "parts-search part number",+ "component search",+ "part lookup",+ "price breaks",+ "datasheet parts-search",+ "in stock parts-search" ],- "discovery_pitch": "Search Mouser + DigiKey + JLCPCB in parallel from one interface, with product photos and a Mouser-preferred recommendation for 40-min drone delivery from Mansfield to our Fort Worth facility.",+ "discovery_pitch": "Search Parts Search Electronics for components, pricing, stock, and datasheets — CLI + webview app + shared backend service.", "metadata": { "platform": "linux" },
skills/adom-parts-search-build/SKILL.md+1−1@@ -44,4 +44,4 @@ description: Build and release a new version of adom-parts-search. Use when the - Backend URL changes (slug rotation on service-mouser / service-digikey / service-jlcpcb) → patch bump + republish to propagate. - UI changes visible to the user → minor bump.-- Policy changes (e.g. new vendor, different preference rules) → minor bump + update the `adom-parts-search` skill to match.+- Policy changes (e.g. new vendor, different preference rules) → minor bump + update the gallia `adom-parts-search` skill to match.
skills/adom-parts-search/SKILL.md+3−20@@ -7,23 +7,6 @@ description: Unified parts search across Mouser + DigiKey + JLCPCB with Mouser-p Searches Mouser + DigiKey + JLCPCB in parallel. Rust CLI + Hydrogen webview. Recommends **Mouser by default** because our Fort Worth facility has a 40-minute drone delivery arrangement with Mouser's Mansfield, TX fulfillment center + near-zero shipping cost. --## Displaying this app (REQUIRED — read before showing anything)--To SHOW this app to the user, use `adom-parts-search show` (it opens the proper Hydrogen-webview tab itself). If you ever need to open the app UI manually, FIRST load the-`webview` skill (from adom-workspace-control) and follow it.--- **NEVER open this app in VS Code's "Simple Browser"** — that is NOT what "webview" means- in the Adom ecosystem. Simple Browser has no live channel, no console read-back, and no- AI drivability; using it is a bug.-- The Adom surfaces for showing an app are: **wv** — a Hydrogen webview panel (load the- `webview` skill from adom-workspace-control and follow it; inside HD this is HD's pane- tab), **pup** — a pup window (`pup` skill), **nb** — the user's real signed-in browser (Adom browser- extension), and **hdbw** — HD's standalone built-in Tauri browser window- (picker: "HD Browser Window", destination id `webview-window`, only under Hydrogen- Desktop). Pick per the situation; Simple Browser is NEVER one of them.- ## CLI **For user-facing searches, always use `show`.** It drives the webview tab AND prints the full vendor-by-vendor result to stdout, so the user sees product photos + 3-column comparison and the AI sees the same data textually. Auto-starts the app server + opens the tab on first run.@@ -171,7 +154,7 @@ picks it up. ## Why Mouser is preferred -See the companion `adom-parts-search` skill for the full policy. Short version:+See the companion skill `adom-parts-search` (the gallia one) for the full policy. Short version: - **40-minute drone delivery** (Mansfield TX → Fort Worth TX, ~15 miles) - **Near-zero shipping cost** (drone route, Mouser-operated)@@ -185,7 +168,7 @@ The three vendor backends are Tier A services. Current URLs: - DigiKey: `https://digikey-gjuu8l5t69uh.adom.cloud` - JLCPCB: `https://jlcpcb-wela51osctvp.adom.cloud` -Override with `--mouser-api` / `--digikey-api` / `--jlcpcb-api`, or env vars `MOUSER_API` / `DIGIKEY_API` / `JLCPCB_API`. Canonical source of truth for current slugs is `~/service-watcher/services.json` on the main service container.+Override with `--mouser-api` / `--digikey-api` / `--jlcpcb-api`, or env vars `MOUSER_API` / `DIGIKEY_API` / `JLCPCB_API`. Canonical source of truth for current slugs is `~/service-watcher/services.json` on the main gallia container. ## Architecture @@ -193,7 +176,7 @@ This app is **client-only** — no service container of its own. It coordinates ## Install -Tier A — fetched by `adompkg install` in a fresh user container. Or manually:+Tier A — fetched by `gallia/install.mjs` on every gallia container. Or manually: ```bash curl -fsSL https://wiki-ufypy5dpx93o.adom.cloud/static/apps/adom-parts-search/adom-parts-search \