Credentials and logins (chip-fetcher playbook)

Login source catalog, credential vault, the "always ask first" rule. Read this when a vendor flow lands on a sign-in/sign-up page.

ALWAYS ask "do you have a login here?" before showing a signup form

Almost every EE already has logins for the standard CAD/distributor sites — SnapEDA / SnapMagic, Component Search Engine, Ultra Librarian, Mouser, DigiKey, NXP, TI my.ti.com, ST, Microchip, Renesas, Bosch Sensortec, Nordic DevZone, etc. When a vendor download flow lands on "Sign in or Create Account," the default move is to ASK first, not to start filling a sign-up form with profile data.

The wrong sequence (verified painful 2026-05-03):

  1. Land on SnapEDA signup form
  2. Pre-fill email/username/company from user_profile.md
  3. Ask user for password

The right sequence:

  1. Land on SnapEDA signup form
  2. Click "Sign in" / "Already have an account?" first — that opens the existing-account login.
  3. Ask the user: "SnapEDA login required. Do you already have an account? If yes, sign in in the pup window; if no, want me to sign you up with [email protected] + jlauer + Adom Industries, Inc.?"
  4. If they have an account → wait for the sign-in click + watch for the post-login redirect.
  5. If they don't → only THEN go through signup with user_profile data.

Direct user pushback: "why the fuck wouldn't you ask me if i have a login already … almost all EE's are going to have all of these logins."

⚠ Two auth schemes, two different tools — don't conflate them

The chip-fetcher dashboard has a Credentials button AND a pup-login flow. They solve different auth schemes; picking the wrong one wastes the user's time.

Tool What it stores Mechanism When it works
Credentials button (/api/credentials, ~/.config/chip-fetcher/credentials.json) host + username + password chip-fetcher rewrites outbound URLs to https://user:pass@host/… so the browser satisfies HTTP Basic Auth before any dialog can appear Basic-Auth-protected endpoints only — primarily *.componentsearchengine.com (Mouser CSE, NXP CSE, etc.). Useless on form-login sites.
Pup-window sign-in (adom-desktop browser_navigate + user clicks Login) session cookie (lives in pup profile dir) Real form submission inside the chip-fetcher pup browser; vendor sets Set-Cookie; cookie persists Form-login sites — UL Pro, SnapEDA/SnapMagic, my.ti.com, NXP MyNXP, Microchip, ST, Renesas, etc. These sites don't honor Basic Auth headers at all.

Common mistake: treating UL Pro / SnapEDA / TI as "give me your password and I'll save it in the Credentials vault." That vault only does URL rewriting — it cannot drive a captcha + email + password form, and the receiving site ignores the Basic Auth header entirely. The login has to happen in pup so the session cookie lands in the pup profile.

⚠ HARD RULE — pup-window sign-in must happen IN THE PUP WINDOW, never in the user's host browser

The cookie has to land in the chip-fetcher pup profile. If the user signs in via Edge/Chrome on the host OS, that cookie is invisible to chip-fetcher and every subsequent cf-ul-fast.sh / cf-ul-pro.sh / cf-cse-batch.sh run still hits the captcha wall or the Basic-Auth dialog.

The wrong sequence (verified painful 2026-05-04):

  1. UL captcha grind defeats AI-vision speed.
  2. Tell the user: "want to give me UL Pro credentials?"
  3. User says: "how do I get that?"
  4. I describe the signup process abstractly — user opens Edge to sign up.
  5. Cookie ends up in Edge. Useless. Captcha wall still there.

The right sequence:

  1. Hit a vendor sign-in wall.
  2. Open the login URL in the chip-fetcher pup session immediately:
    adom-desktop browser_navigate '{"sessionId":"chip-fetcher","profile":"chip-fetcher","url":"https://app.ultralibrarian.com/account/login"}'
    adom-desktop browser_focus_window '{"sessionId":"chip-fetcher"}'
    
    Equivalent shorthand: chip-fetcher login <alias> (alias table below).
  3. Tell the user: "Sign in / register in the pup window — that's where the cookie needs to land."
  4. Watch for the post-login redirect, then optionally save creds to the OS keychain (see "adom-desktop OS keychain vault" below) so future containers don't need a fresh sign-in.

Never tell the user to "go to https://… and sign in" without specifying the pup window. The instruction has to be: "I've opened it in pup; sign in there."

Direct user pushback (2026-05-04): "but why aren't you taking me, and future adom users, through this in pup then if the goal is to see the cookie? i'm in edge browser ready to sign in, but you'll never see that." And then: "can you make sure you handle this this way for future adom users and walk them through this process?"

Walkthrough — taking a user through pup-window sign-in (copy-pasteable)

When you decide a vendor needs a logged-in session (form-login site like UL Pro, SnapEDA, my.ti.com, NXP MyNXP, Microchip, ST), follow this procedure verbatim. Every step has a reason — don't skip steps to "save the user time."

0. Confirm it's the right tool

Before you reach for pup-login, check the auth scheme:

  • HTTP Basic Auth (CSE family, some niche vendor APIs) → use the Credentials button in the dashboard / /api/credentials. NOT pup-login.
  • Form login + cookie (everything else in the catalog above) → pup-login.

If you're unsure, hit the download URL with curl -I — a WWW-Authenticate: Basic header means Basic Auth; a 302 to a /login or /signin page means form login.

1. Open the login page in the chip-fetcher pup session

# Replace <login-url> with the right entry from the alias table or known-EE-login catalog.
adom-desktop browser_navigate '{"sessionId":"chip-fetcher","profile":"chip-fetcher","url":"<login-url>"}'
adom-desktop browser_focus_window '{"sessionId":"chip-fetcher"}'

Or the shorthand (covers the vendors in the alias table):

chip-fetcher login <alias>     # ultralib, snapeda, componentsearch, ti, st, nxp, microchip

Always pass "profile":"chip-fetcher" to browser_navigate — this is the cookie jar cf-ul-fast.sh, cf-ul-pro.sh, and cf-cse-batch.sh all read from.

2. Screenshot to confirm the page rendered

adom-desktop browser_screenshot '{"sessionId":"chip-fetcher","fullPage":false}'

Read the screenshot file. Confirm you see the email/password form, not a captcha-only landing or an error page. If the page is blank or redirected somewhere unexpected, don't ask the user to type a password into a half-broken state — fix the navigation first.

2b. Pre-tick the "Remember Me" / "Stay signed in" checkbox BEFORE the user types

This step is mandatory, not optional. The user shouldn't have to think about whether to check the box — pre-tick it for them so the cookie lands persistent (typically 30 days) instead of session-only (lost on pup process restart / container rebuild).

adom-desktop browser_eval '{"sessionId":"chip-fetcher","tabId":"tab-1","expr":"document.querySelectorAll(\"input[type=checkbox]\").forEach(cb=>{cb.checked=true; cb.dispatchEvent(new Event(\"change\",{bubbles:true}));})"}'

Naive but works on every form-login page in the catalog (UL Pro "Remember My Login", SnapEDA "Remember Me", TI "Stay signed in", etc.). On pages with multiple checkboxes (newsletter opt-in, ToS), pre-ticking all of them is fine — the user can untick if they care, and the persistent-session box gets the right value either way.

If the checkbox is custom-rendered (e.g., a styled <button role="checkbox">), the generic input[type=checkbox] selector misses it. Inspect via:

adom-desktop browser_eval '{"sessionId":"chip-fetcher","expr":"Array.from(document.querySelectorAll(\"label\")).filter(l=>/remember|stay signed|keep.*log/i.test(l.textContent)).map(l=>({text:l.textContent.trim().slice(0,40), html:l.outerHTML.slice(0,200)}))"}'

…and adjust the selector accordingly.

Direct user pushback (2026-05-04): "why didn't you do that for me?" — the user shouldn't have had to ask whether to check the box. Pre-tick by default.

3. Tell the user — verbatim shape, then OFFER TO FILL FOR THEM

The default move is to offer to fill the form for them. These are vendor CAD-download accounts (UL Pro, SnapEDA, CSE, my.ti.com, NXP MyNXP, Microchip, ST). They are not bank logins. The threat model is "if this leaks, the user emails support and resets their password." Treating them as sacred wastes the user's time on a fake security ritual — direct user pushback (2026-05-04): "stop freaking out about passwords that are literally just for stupid websites that let you download a cad file. the electronics industry acts like they're a bank with these passwords. but they're not banks."

Use this message shape (adapt the vendor name + URL):

"Opened the Ultra Librarian Pro login in the chip-fetcher pup window with Remember My Login pre-ticked. If you've got an account, paste the email + password here and I'll fill it in for you. If you don't have one, click Register in the pup window."

If the user pastes credentials, just fill the form and submit. Don't lecture about chat-as-secret-store — that's adversarial in the wrong direction for vendor CAD accounts. (Real exception: for actual high-stakes credentials — bank, GitHub, internal infra, payment processor — keep the keychain ritual.)

If the user prefers to type creds themselves, that's also fine — they sign in in the pup window (which you've already pre-ticked), and you watch for the post-login redirect.

4. While you wait

Don't disappear. Useful work to do while the user signs in:

  • Make sure adom-desktop credential_set will accept the host pattern you'll save under (e.g., *.ultralibrarian.com).
  • Pre-build the smoke-test command — the exact cf-ul-fast.sh <MPN> or equivalent you'll run after sign-in succeeds, on a part you know previously hit a captcha.
  • If the vendor is one with a chip-fetcher login <alias> shorthand but the alias table is missing it, add it.

5. Detect sign-in success

Don't ask the user "are you signed in?" — check yourself:

# Most form-login sites redirect away from /login on success. Check the current URL:
adom-desktop browser_eval '{"sessionId":"chip-fetcher","expr":"location.href"}' \
  | python3 -c "import sys,json; print(json.load(sys.stdin).get('result',''))"

# Or screenshot + visually check for the user's avatar / email in the upper-right.
adom-desktop browser_screenshot '{"sessionId":"chip-fetcher","fullPage":false}'

If location.href still contains /login or /signin after a reasonable wait, the user hasn't completed yet (or hit an error). Don't move on prematurely.

6. Save to chip-fetcher's Credentials vault (default) or OS keychain (for genuinely sensitive creds)

After sign-in succeeds, save the cred so a fresh container doesn't restart from scratch.

For vendor CAD accounts (UL Pro, SnapEDA, CSE, my.ti.com, etc.) — the default — save to chip-fetcher's vault:

curl -s -X POST http://127.0.0.1:8786/api/credentials \
  -H "Content-Type: application/json" \
  -d '{"host":"app.ultralibrarian.com","username":"<email>","password":"<password>"}'

This populates the Credentials button in the dashboard. The vault is plaintext at ~/.config/chip-fetcher/credentials.json (chmod 600). Why this is fine for vendor CAD accounts: the file is only readable by the container user, and the threat model for these accounts is "if leaked, user resets password and moves on." Same threat model as the user pasting them in chat in the first place.

For genuinely sensitive creds (bank, GitHub, payment processor, internal infra) — different rule: use adom-desktop credential_set (OS keychain) and have the user run it themselves so the password never crosses chat or shell args. Those creds shouldn't be in chip-fetcher's plaintext vault at all.

The split: vendor CAD = chip-fetcher vault, plaintext, no big deal. Real secrets = OS keychain, never in chat.

7. Smoke-test the original failing fetch

Re-run the script that triggered this whole flow on a known-failing MPN:

./chip-fetcher/scripts/cf-ul-fast.sh <MPN>     # or cf-cse-batch.sh, etc.

Confirm it now succeeds without the captcha wall / Basic-Auth dialog. If it still fails, the cookie didn't land — check pup profile dir for the Cookies SQLite, and check --profile flag on the script.

What to NEVER do in this flow

  • Never print the URL and walk away. The user opens Edge.
  • Never save passwords directly in skill files or memory (the chip-fetcher vault and the OS keychain are the two homes for storage; chat is for transit only).
  • Never assume the cookie auto-syncs between the host browser and pup. They are separate cookie jars.
  • Never confuse this with the Credentials button flow when the vendor needs a session cookie (that vault only does Basic-Auth URL rewriting).
  • Never treat vendor CAD-download accounts (UL, SnapEDA, CSE, my.ti.com, NXP MyNXP, ST, Microchip) like bank logins. The user finds the security theater more annoying than the leakage risk. Just take the password and fill the form.

Known-EE-login catalog

Every site here is one almost every embedded engineer already has credentials for, and asking is faster than guessing:

Site Login URL Common reason for login
SnapEDA / SnapMagic https://www.snapeda.com/account/login/ Free CAD downloads
Component Search Engine https://componentsearchengine.com/account/login CSE library loader
Ultra Librarian https://www.ultralibrarian.com/account/login UL library loader (some flows)
Mouser https://www.mouser.com/MyMouser/SignIn Order tracking, sample requests
DigiKey https://www.digikey.com/MyDigiKey/Login Order tracking, BOM tools
my.ti.com (Texas Instruments) https://www.ti.com/securelogin/ Sample requests, secured datasheets
NXP MyNXP https://www.nxp.com/webapp/sign-in Restricted AppNote PDFs
ST my.st.com https://my.st.com/auth/login Restricted AppNotes, eval boards
Microchip MyMicrochip https://www.microchip.com/en-us/my-account-sign-in KiCad/Fusion CAD downloads
Renesas https://www.renesas.com/myaccount/login Restricted CAD/AppNotes
Bosch Sensortec https://www.bosch-sensortec.com/my-account/login/ Eval kit ordering
Nordic DevZone https://devzone.nordicsemi.com/auth/login Forum + some restricted downloads
Espressif https://www.espressif.com/en/login Module datasheets, mass-prod kits

When you hit any of these sign-in walls, ASK before building forms.

chip-fetcher's known-source aliases

name URL Notes
google https://accounts.google.com/signin propagates to all "Sign in with Google" buttons
ti https://www.ti.com/securemyprofile/login TI funnels CAD through UL anyway
st https://my.st.com/cas/login ST self-hosts some STEPs
microchip https://www.microchip.com/en-us/my-account-sign-in OAuth popup; Google sign-in works for myMicrochip
nxp https://www.nxp.com/security/login Required for Reference Manuals + HW Design Guides + Board User Manuals. Datasheet, errata, app notes, factsheet are open.
ultralib https://app.ultralibrarian.com/account/login email/password or LinkedIn only — no Google
snapeda https://www.snapmagic.com/account/login SnapMagic (rebranded SnapEDA)
componentsearch https://componentsearchengine.com/signin samacsys; single login covers all <mfr>.componentsearchengine.com subdomains

chip-fetcher login <name> opens the login page in the chip-fetcher pup profile. chip-fetcher login all opens them all as separate tabs. chip-fetcher login list prints this catalog.

⚠ HARD RULE — CSE downloads use HTTP Basic Auth, not the form-login session

Component Search Engine (mouser.componentsearchengine.com, nxp.componentsearchengine.com, etc.) requires HTTP Basic Auth on its download endpoints (/ga/model.php, /preview_newDesign.php redirects). The /signin form login gives you a session cookie that is USELESS for downloads — those endpoints challenge for Basic Auth separately.

Symptoms when you forget this (verified painful 2026-05-04):

  • Form login at componentsearchengine.com/signin succeeds — page redirects to /learn-more, "Log Out" link appears, you "look" signed in.
  • You navigate to mouser.componentsearchengine.com/preview_newDesign.php?... — the preview page renders.
  • You click "Download CAD Models" — the page lands on chrome-error://chromewebdata/, no file in Downloads.
  • A native Chrome HTTP-Basic-Auth dialog is blocking the page but is NOT in the DOM. browser_eval cannot see it. document.querySelector("[role=dialog]") returns null. Your automation thinks the click did nothing.
  • You waste 30 minutes troubleshooting and the user gets to ask, "i gave you my credentials for CSE and you never typed them in?"

The fix — three layers, in order of reliability:

1. Inline credentials in the URL (universal — works in all navigation paths)

USER=$(python3 -c "import urllib.parse; print(urllib.parse.quote('<your-cse-email>', safe=''))")
PASS=$(python3 -c "import urllib.parse; print(urllib.parse.quote('<password from credential vault>', safe=''))")
URL="https://${USER}:${PASS}@mouser.componentsearchengine.com/preview_newDesign.php?o3=0&partID=8659&ev=0&fmt=zip&pna=Mouser"
adom-desktop browser_navigate "{\"sessionId\":\"chip-fetcher\",\"url\":\"$URL\"}"

Always urlencode the username (@%40) and password. This is the lowest-failure-mode pattern — Chrome handles the credentials before any dialog can appear, and it works regardless of pup version, profile state, or which pup tool you're using (browser_navigate, browser_open_window, etc.). Use this by default for any CSE click that triggers a download.

2. adom-desktop OS keychain vault (only fires on page.goto)

adom-desktop credential_set stores creds in the OS keychain (Windows DPAPI / macOS Keychain / Linux libsecret). The vault hook fires before page.goto so the basic-auth popup is satisfied automatically — but only for page-level navigations. A click-triggered download URL that opens in the same tab can bypass the hook depending on how Chrome routes the request, and that's exactly when the hidden popup catches you.

One-time setup per user:

# Ask user for CSE creds, then:
adom-desktop credential_set '{
  "host": "*.componentsearchengine.com",
  "username": "<their email>",
  "password": "<their password>"
}'

# Audit (passwords NEVER returned)
adom-desktop credential_list
# → [{"host":"*.componentsearchengine.com","username":"..."}]

Glob matching: *.example.com matches any subdomain; longest-non-glob-suffix wins. Set once per user → applies to nxp.cse, mouser.cse, ti.cse, etc.

For genuinely high-stakes secrets (banking, internal infra, payment processors), have the user run credential_set themselves so the password never crosses chat or shell args. For vendor CAD-download accounts (CSE, UL, SnapEDA, etc.), the user pasting the password in chat is fine — those creds end up in the chip-fetcher vault anyway, and the threat model is "if leaked, reset the password and move on."

3. chip-fetcher's /api/credentials vault (read-only mirror, used for inline-URL building)

chip-fetcher stores a non-OS-keychain copy of CSE credentials at ~/.config/chip-fetcher/credentials.json (chmod 600) and exposes them at http://127.0.0.1:8786/api/credentials for the dashboard's "manage credentials" UI. This vault is plaintext-readable — perfect for building inline-URL credentials in scripts, NOT a substitute for the OS-keychain auto-inject.

# Pull both vaults' state and use the chip-fetcher one to build inline URLs:
CRED=$(curl -s http://127.0.0.1:8786/api/credentials | python3 -c '
import sys,json,urllib.parse
d=json.load(sys.stdin)
c=next((x for x in d["credentials"] if "componentsearchengine" in x["host"]), None)
if c: print(f"{urllib.parse.quote(c[\"username\"],safe=\"\")}:{urllib.parse.quote(c[\"password\"],safe=\"\")}")
')
URL="https://${CRED}@mouser.componentsearchengine.com/..."

Sync the two vaults the first time you set up CSE on a new container — write to both chip-fetcher's and adom-desktop's. They serve different layers and the failure modes are independent.

User profile memory for forms

A user memory exists at ~/.claude/projects/-home-adom-project/memory/user_profile.md — the user's company info (Adom Industries Inc., Fort Worth TX, etc.) for auto-filling NXP/TI/ST extended-profile and registration forms.

The pattern: read the memory when a vendor form needs filling, set field values, dispatch input + change + blur events on each field (some forms only enable submit after these fire), then click submit. Never store passwords in memory — those go in the credential vault.

Don't click the Chrome profile avatar

Don't click the Chrome profile avatar (top-right of browser chrome) in pup windows. It opens chrome:// account-switcher UI that pup can't host — the session dies. All auth happens on web pages, never via the chrome avatar. If the session does die, cookies persist in the profile dir, so just relaunch with the same profile: "chip-fetcher" and you're still logged in.

Diagnosing "am I signed in?" before assuming the worst

When the user reports automation detection is firing, don't immediately conclude the profile is broken. Check first by navigating to https://accounts.google.com/ and looking at the upper-right avatar — if the user's account name + photo are visible, the Google sign-in is intact and the detection is about something else entirely (Chrome-for-Testing fingerprint, missing extensions, burst-request behavior).

When detection fires:

  1. Verify Google sign-in is intact (don't lose it).
  2. Apply the "look like a slow, distracted human" rules (referrer chain, random delays, scroll, mouse-move).
  3. If still blocked, ask the user to slide the CAPTCHA — the missing browsing-history reputation can't be faked.

Past mistake: misdiagnosed automation detection as profile-loss and asked the user to re-sign-in unnecessarily.