| name | asdabot |
| description | Use the asdabot CLI to manage ASDA grocery shopping. Use when the user asks to search for groceries, add items to basket, check delivery slots, place an order, or manage their ASDA grocery account. Trigger phrases include "order groceries", "ASDA", "delivery slot", "shopping list", "add to basket", "weekly shop". |
asdabot — ASDA Grocery CLI
The asdabot command must be available on PATH. Install with uv tool install asdabot or pipx install asdabot.
Prerequisites
- ASDA account with a saved delivery address.
- One-time setup:
asdabot auth login — opens a browser window; the user logs in manually (with "Keep me signed in" ticked) and presses Enter in the terminal. Saves tokens, address, and store automatically.
- Check auth with
asdabot auth status. Refresh tokens last 90 days (rolling).
Command Reference
Search (no auth needed)
asdabot search "chicken"
asdabot search "milk" -n 5
asdabot search "eggs" -d
- The CIN column (first) is the product ID used for
basket add.
Product Details
asdabot product <CIN>
Basket
asdabot basket show
asdabot basket add <CIN>
asdabot basket add <CIN> -q 3
asdabot basket add-many <CIN> <CIN> <CIN>
asdabot basket remove <CIN>
asdabot basket remove <ITEM_ID>
asdabot basket clear
- ASDA allows one basket per customer. Use
basket clear to start fresh.
- Once a slot is booked,
basket show breaks out Items vs "Delivery & fees" — the fees line is the slot price plus ASDA's small-basket charge (applied to orders under their minimum spend).
- Prefer
basket add-many over multiple basket add calls — it adds all items in a single API request.
add-many is atomic: if any item is rejected (e.g. unavailable for the booked slot), none are added. This is intentional — a partial basket may require changing plans.
- Do NOT run multiple
basket add calls in parallel — use basket add-many instead.
Delivery Slots
asdabot slots list
asdabot slots list -d 2
asdabot slots book 11
asdabot slots book <N>
- Max
-d value is 3. ASDA limits queries to a 4-day window. Do NOT pass 4+.
slots list caches the ordered IDs to ~/.config/asdabot/last_slots.json. slots book <N> resolves N against that cache — always re-run slots list immediately before booking so the # you pick is current.
- Slot IDs are long base64 strings (~155 chars). The row-# form avoids the copy-paste pitfall where the Rich table wraps the ID across lines and a character gets lost. Prefer it.
- Slot IDs encode the delivery address. Re-list after changing address.
Checkout
asdabot checkout
- Checkout does NOT place the order. It prints the order summary and opens ASDA's checkout page in the user's browser — the user reviews and completes payment there manually.
- Requires: items in basket and a booked slot.
- After the user says they've paid, verify with
asdabot orders.
Orders
asdabot orders
Auth
asdabot auth status
asdabot auth refresh
asdabot auth login
- Access tokens auto-refresh (30min expiry, 90-day rolling refresh token).
auth login is interactive — tell the user to run it in their terminal.
- Login fetches delivery address and store ID from the ASDA account automatically.
Typical Order Flow
asdabot basket clear
asdabot search "semi skimmed milk"
asdabot search "eggs"
asdabot basket add-many 165468 166781
asdabot basket show
asdabot slots list
asdabot slots book <N>
asdabot basket show
asdabot checkout
Weekly Shop Shortcut
If the user asks to "do the weekly shop" or "order my regulars":
asdabot basket clear
- Search for each item the user wants (collect CINs)
asdabot basket add-many <CIN1> <CIN2> ... — add all items in one request
asdabot slots list — find a slot
asdabot slots book <N>
- Show basket summary
asdabot checkout — the user completes payment in their browser
Important Notes
- Payment is always manual.
checkout only opens ASDA's payment page — the user pays in their own browser, so no money moves without them.
- Config:
~/.config/asdabot/ (account.json, chrome-profile/).
- Only one basket at a time — no parallel orders.
- If commands fail with an auth error, the user needs to run
asdabot auth login again (interactive — tell them to run it in their terminal).
Architecture
- Search: Algolia API (no auth, public keys)
- Basket/Slots/Orders: Salesforce Commerce Cloud (SFCC) API via proxy
- Auth: SLAS OAuth2 with 90-day rolling refresh tokens; login captures the session from a real Chrome window via the Chrome DevTools Protocol
- Payment: manual — ASDA's checkout page in the user's own browser
Self-Correcting
Any time a command fails due to incorrect syntax, wrong flags, API changes, or a misunderstanding, update this skill with the correct approach before continuing. Prefer fixing incorrect examples over adding new sections.