Manages grocery shopping at Willys.se. Search for products, browse categories, and manage a shopping cart. Use when the user wants to find groceries, add/remove items from their Willys cart, or view their cart.
A CLI tool for shopping at Willys.se (Swedish grocery store).
Credentials are read from WILLYS_USERNAME and WILLYS_PASSWORD environment variables, or from a .env file in the current directory. They can also be passed with -u and -p flags.
# Search for products (default 10 results)
willys-cli search mjölk
# Search with a specific number of results (fetches multiple pages if needed)
willys-cli search "ekologisk mjölk" 20
Output includes product name, brand, volume, price, compare price, and product code.
# List all top-level categories (with 2 levels of subcategories)
willys-cli categories
# Browse products in a specific category
willys-cli browse frukt-och-gront/frukt/citrusfrukt
Category paths use the URL-style paths shown in the categories output (e.g. kott-chark-och-fagel/korv).
# Show current cart
willys-cli cart
# Add a product (product code from search results, optional quantity defaults to 1)
willys-cli add 101233933_ST 2
# Remove a product
willys-cli remove 101233933_ST
# Clear entire cart
willys-cli clear
Cart-modifying operations (add, remove, clear) print the updated cart after each change.
willys-cli -i shopping-list.csv
CSV format (one operation per line, lines starting with # are ignored):
add,101233933_ST,2
add,101205823_ST,1
remove,101233933_ST
cart
clear
Product codes look like 101233933_ST or 100126409_KG. They are shown in parentheses
in search and browse output. Always use the exact code from the output.
willys-cli search mjölkwillys-cli add 101233933_ST 2willys-cli cartwillys-cli categories to help the user browse when they don't know exactly what they want._ST are sold per item, _KG are sold by weight.