Use the coop-cli tool to search for grocery products, manage shopping carts, and find stores on Coop.se (Swedish grocery chain). Activate when the user wants to shop for groceries, search for food products, manage a Coop shopping cart, or find Coop stores.
You have access to coop-cli, a command-line tool for interacting with Coop.se online grocery shopping.
All commands except stores require Coop.se credentials. Set them as environment variables:
export COOP_EMAIL="[email protected]"
export COOP_PASSWORD="password"
Or pass them as flags: --email / --password.
Most commands require a store ID. Set it as an environment variable:
export COOP_STORE="012345"
Or pass it as a flag: . Find store IDs with the command.
--storestoresIf credentials or store ID are missing, prompt the user to set them up before proceeding.
coop-cli stores <query>
Search by city, name, or address. The STORE ID column is the value to use with --store or COOP_STORE.
coop-cli search <query> [--limit N]
Returns: ID, name, manufacturer, size, price, comparative price, and category. Default limit is 10 results.
coop-cli cart list # Show cart contents
coop-cli cart add <product-id> [qty] # Add product (default qty: 1)
coop-cli cart remove <product-id> # Remove product
coop-cli cart clear # Empty the cart
Product IDs come from search results.
coop-cli update
When the user asks to shop for groceries or manage their cart, follow this pattern:
coop-cli stores <city or name>coop-cli search <query>coop-cli cart add <product-id> [qty]coop-cli cart list to confirmcart list after cart add