A CLI tool for shopping on Nemlig.com (Danish online grocery store). Parse recipes, search products, and add items to your cart.
# Install from PyPI
uv tool install nemlig-shopper
# Or run directly with uvx
uvx nemlig-shopper --help# Log in to Nemlig.com
nemlig-shopper login
# Parse a recipe to see ingredients
nemlig-shopper parse "https://www.valdemarsro.dk/pasta-carbonara/"
# Search for products
nemlig-shopper search "mælk"
# Add a product to cart (by product ID from search results)
nemlig-shopper add 701015
# View your cart
nemlig-shopper cart| Command | Description |
|---|---|
login |
Authenticate with Nemlig.com |
logout |
Clear saved credentials |
parse <url> |
Parse recipe and display ingredient list |
search <query> |
Search Nemlig products |
add <product_id> |
Add product to cart |
cart |
View current cart contents |
# From URL (supports 100+ recipe sites)
nemlig-shopper parse "https://www.valdemarsro.dk/lasagne/"
# From text input
nemlig-shopper parse --text "500g hakket oksekød
1 løg
2 fed hvidløg
400g hakkede tomater"# Basic search
nemlig-shopper search "økologisk mælk"
# Limit results
nemlig-shopper search "ost" --limit 5# Add single item
nemlig-shopper add 701015
# Add with quantity
nemlig-shopper add 701015 --quantity 2Credentials can be provided via:
-
Environment variables (
.envfile):NEMLIG_USERNAME=your-email@example.com NEMLIG_PASSWORD=your-password -
Saved credentials: Run
nemlig-shopper loginto save credentials locally
Credentials are stored in ~/.nemlig-shopper/credentials.json (chmod 600).
Uses recipe-scrapers supporting 100+ sites including:
- Valdemarsro (Danish)
- Mummum (Danish)
- AllRecipes
- BBC Good Food
- Serious Eats
- And many more...
# Clone and install
git clone https://github.com/mhattingpete/nemlig-shopper.git
cd nemlig-shopper
uv sync
# Run tests
uv run pytest
# Run CLI locally
uv run nemlig --helpThis CLI is designed to be agent-friendly. An LLM agent (Claude Code, custom agents, etc.) can drive the full shopping workflow by chaining CLI commands.
- Install the CLI (see Installation)
- Set up credentials via environment variables or
nemlig-shopper login - Point your agent at
SKILL.mdfor the full command reference
A shopping list can contain a mix of recipe URLs and plain ingredients. The agent workflow is:
Shopping List (URLs + plain items)
├─ Recipe URLs → nemlig-shopper parse <url> → extract ingredients
├─ Plain items → use directly
↓
For each ingredient:
→ nemlig-shopper search "<danish ingredient name>" → get product IDs
→ nemlig-shopper add <product_id> --quantity <n> → add to cart
↓
nemlig-shopper cart → verify final cart
# 1. Parse a recipe URL to get ingredients
nemlig-shopper parse "https://www.valdemarsro.dk/pasta-carbonara/"
# Output: list of ingredients with quantities and units
# 2. Search for each ingredient (Danish names work best)
nemlig-shopper search "spaghetti"
nemlig-shopper search "pancetta"
nemlig-shopper search "æg"
nemlig-shopper search "parmesan"
# 3. Add selected products by ID
nemlig-shopper add 701015 --quantity 1
nemlig-shopper add 503220 --quantity 1
nemlig-shopper add 100042 --quantity 1
nemlig-shopper add 504100 --quantity 1
# 4. Verify the cart
nemlig-shopper cart- Translation: Nemlig.com is Danish. Translate English ingredient names to Danish before searching (e.g., "milk" → "mælk", "onion" → "løg", "chicken" → "kylling").
- Product selection: Search results include product ID, name, price, size, and stock status. Pick products that are in stock and match the needed quantity/size.
- Quantities: The
parsecommand outputs quantities and units per ingredient. Use these to determine how many units of a product to add. - Multiple recipes: Process each recipe URL separately with
parse, then search and add all ingredients. - Plain items: Items like "mælk" or "rugbrød" that aren't from a recipe can be searched directly without parsing.
- Skill file: See
SKILL.mdfor the complete agent-readable command reference.
Instead of driving the CLI, you can run Nemlig Shopper as an MCP server so Claude searches, picks products, and fills your basket directly in chat. Paste a shopping list mixing recipe URLs and plain groceries and Claude handles the rest — it never places an order, it stops at a filled basket.
-
Install the package (see Installation) so the
nemlig-mcpcommand is available. -
Add the server to your client's MCP config. For Claude Desktop, edit
claude_desktop_config.json:{ "mcpServers": { "nemlig": { "command": "nemlig-mcp", "env": { "NEMLIG_USERNAME": "your-email@example.com", "NEMLIG_PASSWORD": "your-password" } } } }(With
uvx:"command": "uvx","args": ["--from", "nemlig-shopper", "nemlig-mcp"].) -
Restart the client — Nemlig's tools then appear in chat.
| Tool | What it does |
|---|---|
search_products |
Search Nemlig; returns candidates tagged cheapest / recommended / organic |
pick_products |
Like search_products, but renders an interactive picker (MCP Apps) so you click to add — falls back to the same list where rendering isn't supported |
parse_recipe |
Expand a recipe URL or ingredient text into structured ingredients |
add_to_cart |
Add a product (by id) to the basket |
view_cart |
Show the current basket and totals |
clear_cart |
Empty the basket |
There is intentionally no checkout tool — review and place the order yourself at nemlig.com/basket.
Interactive picker:
pick_productsships a clickable card UI via MCP Apps. It renders today in clients that support MCP Apps (e.g. claude.ai); Claude Desktop's support is still maturing, and there it degrades gracefully to the conversational candidate list.Disabling it: set
NEMLIG_MCP_APPS=0(orfalse/no/off) in the server'senvto turn the widget off entirely —pick_productsand the UI resource aren't registered, leaving only the conversational tools.
Here's my list: https://www.valdemarsro.dk/pasta-carbonara/ plus milk, rye bread, and bananas. Find good options on Nemlig and fill my basket — ask me when you're unsure.
- Uses an unofficial Nemlig.com API
- Danish ingredient/product names work best
- Product IDs are shown in search results
MIT License - See LICENSE file for details