Mathem CLI
- Run
npx --yes mathem-cli --help. Continue when help works. - Extract foods, quantities, budget, dietary constraints, quality criteria, and substitutions. For quality-sensitive food such as meat, shortlist products unless origin, cut, or production method makes the choice unambiguous.
- Search with
npx --yes mathem-cli search "<query>" --limit <count>and inspect candidates withnpx --yes mathem-cli product <id>. Compare published ingredients, allergens, nutrition, origin, freshness, availability, and unit price. - Run
npx --yes mathem-cli list. If authentication is required, runnpx --yes mathem-cli loginand let the user complete the Chrome flow. Continue whenlistreturns JSON. - Mutate one item at a time with
npx --yes mathem-cli add <id> [quantity],npx --yes mathem-cli update <quantity> <id>, ornpx --yes mathem-cli delete <id>. Verify each returned cart; after an uncertain result, runlistbefore retrying. - Run
npx --yes mathem-cli listand report the final items, quantities, totals, quality trade-offs, and unknown fields.
Rules:
- Prefer product IDs.
- Treat
nullas unknown and zero as measured zero. - Treat private API failures as contract drift; preserve the last verified cart state.
- Stop at the verified cart. Checkout, payment, delivery slots, and order confirmation stay with the user.