Search groceries and manage a shopping cart on Oda.no using the `oda` CLI. Use when you need to find products, check what the user usually buys, find deals or bonus items, view or modify the cart, or look at past orders. Trigger phrases: "oda", "dagligvarer", "handleliste", "handlekurv", "bestilling", "search groceries", "add to cart", "check cart", "recent orders", "Ditt Oda".
You have access to the oda CLI which interacts with Oda.no (Norwegian online grocery delivery).
Full path: /Library/Frameworks/Python.framework/Versions/3.13/bin/oda
Always use --json flag for machine-readable output. Use 2>/dev/null to suppress stderr.
Example:
oda --json search melk 2>/dev/null
Session is stored at ~/.config/oda/session.json and persists across commands.
If any command returns an error containing "Session expired" or "Not logged in", tell the user:
oda login
Credentials can be set via environment variables and — but never set or read these yourself; ask the user to handle authentication.
ODA_EMAILODA_PASSWORDoda --json search <query>
Returns a list of products matching the query.
[
{"id": 430, "name": "Tine Lettmelk 1% fett", "price": "20.60", "unit_price": "20.60", "unit": "l", "availability": "available"},
{"id": 437, "name": "Tine Helmelk", "price": "23.50", "unit_price": "23.50", "unit": "l", "availability": "available"}
]
Key fields: id (use for cart operations), name, price (NOK), unit_price, unit, availability (e.g. available, out_of_stock, available_later).
Product IDs are stable — save them for reuse in cart operations.
oda --json recommended
Returns grouped product lists personalised to the user's purchase history.
[
{
"group_id": "likely-to-buy-products",
"group_title": "Varer vi tror du trenger nå",
"products": [{"id": 132, "name": "Tine Lettmelk 1,75 l", "availability": "available", ...}]
},
{
"group_id": "most-purchased-products",
"group_title": "Varer du pleier å handle",
"products": [...]
}
]
This is the fastest way to find the user's regular groceries. Use it before searching when building a recurring shopping list.
oda --json bonus
Returns products currently giving 10% bonus. Same structure as search results.
Prefer bonus products over regular search results when they satisfy a need.
oda --json tilbud
Returns products currently on sale. Includes a deal field describing the offer.
[
{"id": 291, "name": "FREIA Helnøtt", "price": "29.90", "unit_price": "149.50", "unit": "kg", "deal": "2 for 49 kr", "availability": "available"}
]
Prefer on-sale products over regular search results when they satisfy a need.
oda --json cart show
Returns current cart contents.
[
{"product_id": 132, "name": "Tine Lettmelk 1,75 l", "quantity": 2, "price": "72.00", "availability": "available"}
]
oda cart add <product_id>
Adds one unit of the product. Repeat the command to add more units.
No JSON output — check exit code (0 = success).
oda cart remove <product_id>
Removes all units of the product from the cart.
oda --json orders
oda --json orders --from-date 2025-01-01
oda --json orders --to-date 2025-12-31
oda --json orders --from-date 2025-01-01 --to-date 2025-03-31
Returns recent orders, optionally filtered by date range. Dates are YYYY-MM-DD.
[
{"order_number": "tk5az2", "delivery_time": "man 30. mars, 07:42", "gross_amount": 2435.36, "currency": "NOK"}
]
oda --json orders <order_number>
Returns all line items from a specific order.
[
{"product_id": 132, "description": "Tine Lettmelk 1,75 l", "quantity": 2.0, "gross_amount": 72.0}
]
oda --json recommended — check both groups for items the user regularly buysoda --json bonus and oda --json tilbud — note any deals that cover a needoda --json search <item> for anything not found aboveoda cart add <id>oda --json cart showoda --json orders --from-date 2025-01-01 # list orders from a date
oda --json orders <order_number> # see what was in a specific order
Use order history to reconstruct a previous shopping list or analyse spending.
--json when you need to process output programmatically.recommended before search — it's faster and more likely to find the right product IDs.availability field before adding products to the cart. Prefer available products; warn the user about out_of_stock or available_later items.oda cart add <id> once per unit.oda login.