# chip-fetcher

![chip-fetcher flow: one prompt to manufacturer-grade parts in KiCad, Fusion, Altium, and OrCAD](chip-fetcher-flow-v2.png)


## The stack

`adom-chip-fetcher` is the top of a stack, one command pulls a manufacturer-grade part bundle by orchestrating a tier of focused Adom apps. Each box below is a real app (click through to its page):

![The adom-chip-fetcher stack](chip-fetcher-stack.png)

Download manufacturer-grade chip CAD bundles (STEP + KiCAD symbol + KiCAD footprint + datasheet + design-help PDFs) into a structured library by driving Chrome via [pup](https://github.com/adom-inc/adom-desktop).

The defining rule: **fetch from the manufacturer's own website first**, only fall back to Mouser, DigiKey, or Component Search Engine when the manufacturer doesn't self-host CAD, and only with explicit user approval.

## What it does

```bash
chip-fetcher fetch TPS62840            # opens the TI page → UL deep-link → drives the form → auto-pulls
chip-fetcher pull '<windows-path>'     # pulls a downloaded zip from the user's desktop
chip-fetcher import path/to/zip --mpn  # absorbs a downloaded file into library/<MPN>/
chip-fetcher list                       # shows what's in library/ vs missing per slot
chip-fetcher login <source>             # opens a vendor login page in the chip-fetcher pup profile
chip-fetcher install                    # deploys SKILL.md to ~/.claude/skills/chip-fetcher/
```

After running, each chip lands in:

```
library/<MPN>/
├── <MPN>.step          # rich manufacturer STEP, named PRODUCTs (Body, ThermalPin, PinsArrayLR, PinsArrayTB)
├── <MPN>.kicad_sym
├── <MPN>.kicad_mod
├── <MPN>.pdf           # datasheet
├── <MPN>-errata-*.pdf
├── <MPN>-appnote-*.pdf
├── <MPN>-hwguide.pdf
└── info.json           # provenance trail (mfr-direct vs mouser-fallback)
```

## Reuse first, then align pin-1

**Reuse before re-fetch.** The sourcing ladder now starts at the **Adom Wiki** (`Source::AdomWiki`): if the part is already published as a component bundle, chip-fetcher pulls that bundle (`.kicad_sym` / `.kicad_mod` / STEP / datasheet) instead of scraping vendors. Free, fast, and Adom-consistent. It only falls through to the manufacturer-first ladder when there's no published match.

**Pin-1 alignment.** From the dashboard you can **Align pin-1** in [chipsmith](https://wiki.adom.inc/adom/adom-chipsmith): line up the 3D chip's pin-1 with the footprint's pin-1 and sign off. chip-fetcher reads the sign-off back, derives the footprint's own pin-1 corner straight from the `.kicad_mod`, shows a **Pin-1 status** on every card (and flags a chip-vs-footprint mismatch), and `gate --strict` requires it.


![The chip-fetcher dashboard: per-part cards with symbol / footprint / 3D, source carat, and Pin-1 alignment status](dashboard-pin1.png)

*Each card is one part. The Pin-1 badge shows the footprint target (fp NW) until you align + sign off in chipsmith, then it locks to the chip corner (Pin-1 checkmark NW).*

## Verified vendors

| Vendor | Path | Notes |
|---|---|---|
| Texas Instruments | `vendor.ultralibrarian.com/TI/embedded/...` | mfr-direct via UL |
| STMicroelectronics | `vendor.ultralibrarian.com/stmicro/embedded/...` | mfr-direct via UL |
| Analog Devices | `vendor.ultralibrarian.com/adi/embedded/...` | mfr-direct via UL |
| Microchip | `vendor.ultralibrarian.com/microchip/...` | mfr-direct via UL (iframe) |
| NXP | `nxp.com` (BXL) + `nxp.componentsearchengine.com` (STEP) | mfr-direct |
| Espressif | Mouser ECAD-Model fallback | mfr-uploaded to SamacSys |
| Lattice | Mouser ECAD-Model fallback | mfr-uploaded to SamacSys |
| Renesas | Mouser ECAD-Model fallback | mfr-uploaded to SamacSys |
| JST | `jst-mfg.com` (email-gated) | mfr-direct STEP/IGES **emailed** to you, see below |

## Email-delivered CAD (JST)

Some manufacturers **email** the CAD file instead of serving a download. **JST**
is the reference case: since April 2025, requesting a STEP/IGES on jst-mfg.com
sends it as an **email attachment**. The full flow, driving your real Chrome
past Cloudflare, the License Agreement form, retrieving the attachment via
[adom-google](https://wiki.adom.inc/adom/adom-google) (Gmail) or a
build-your-own fetcher for other providers, and the breadcrumb pattern that
keeps chip-fetcher provider-agnostic, is documented in its own sub-README:

➡️ **[docs/jst-email-gated-cad.md](docs/jst-email-gated-cad.md)**, Email-delivered CAD: the JST flow (and how to add any email-gated manufacturer)

🏆 **[docs/jst-showcase.md](docs/jst-showcase.md)**, Showcase (with screenshots): how chip-fetcher cracked JST's Cloudflare + email gate end-to-end, and bundled the 5 most-common JST connectors with symbol + footprint + 3D.

> ⚖️ **Note on JST files:** JST's download License Agreement (clause 2) prohibits redistributing their CAD to third parties, so we do **not** rehost JST's emailed STEP/IGES or datasheets. Connector component pages we publish use the **redistributable KiCad libraries** for symbol/footprint/3D and **link to JST** for any JST-authored model.

Agents: the same content lives in the skill as `playbooks/jst.md` +
`playbooks/jst-email-retrieval.md`.

### Demo (60s, narrated)

[![JST email-gated CAD demo, watch](demo/jst-demo-hero.png)](demo/jst-email-gated-cad-demo.webm)

▶ **[Watch the 60-second demo](demo/jst-email-gated-cad-demo.webm)**, proven end-to-end on **PHR-2**: JST's global catalog → the License Agreement form → the "data has been sent to your email address" confirmation → `adom-google` pulls the emailed `PHR-2.STEP` → the chip-fetcher library card with its auto-rendered 3D model.

Reproducible recipe (scenes, narration, TTS config): **[demo/jst-email-gated-cad-demo-script.md](demo/jst-email-gated-cad-demo-script.md)**.

See [SKILL.md](https://wiki-ufypy5dpx93o.adom.cloud/apps/chip-fetcher) for the full skill documentation, vendor URL patterns, and the failure-mode notes captured from real Adom-user feedback.

## Install

```bash
curl -fsSL https://wiki-ufypy5dpx93o.adom.cloud/static/apps/chip-fetcher/chip-fetcher \
  -o /usr/local/bin/chip-fetcher && chmod +x /usr/local/bin/chip-fetcher && chip-fetcher install
```

## Companion specs

Two adom-desktop fix-it specs live in [scripts/](scripts/):

- `adom-desktop-pullfile-speed-prompt.md`, streaming binary WS frames + HTTP fallback so 50+ MB files (NXP reference manuals) don't time out
- `adom-desktop-credential-vault-prompt.md`, DPAPI/Keychain-encrypted credential vault hooked into `puppeteer.page.authenticate()` so basic-auth popups never appear

Paste either into Claude Code on the desktop to implement.

## License

**MIT**, © 2026 Adom Industries Inc. Open source; see [LICENSE](LICENSE). Modify, fork, and redistribute freely.
