Recipe-to-Cart CLI Tool for Nemlig.com
Project description
Nemlig Shopper 🛒
A CLI tool for shopping on Nemlig.com (Danish online grocery store). Parse recipes, search products, and add items to your cart.
Installation
# Install from PyPI
uv tool install nemlig-shopper
# Or run directly with uvx
uvx nemlig-shopper --help
Quick Start
# 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
Commands
| 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 |
Usage Examples
Parse a Recipe
# 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"
Search Products
# Basic search
nemlig-shopper search "økologisk mælk"
# Limit results
nemlig-shopper search "ost" --limit 5
Add to Cart
# Add single item
nemlig-shopper add 701015
# Add with quantity
nemlig-shopper add 701015 --quantity 2
Configuration
Credentials 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).
Supported Recipe Sites
Uses recipe-scrapers supporting 100+ sites including:
- Valdemarsro (Danish)
- Mummum (Danish)
- AllRecipes
- BBC Good Food
- Serious Eats
- And many more...
Development
# 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 --help
Using with Claude Code or LLM Agents
This 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.
Prerequisites
- 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
Agent Workflow
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
Example: Agent Shopping Session
# 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
Tips for Agent Integration
- 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.
Notes
- Uses an unofficial Nemlig.com API
- Danish ingredient/product names work best
- Product IDs are shown in search results
License
MIT License - See LICENSE file for details
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nemlig_shopper-1.0.1.tar.gz.
File metadata
- Download URL: nemlig_shopper-1.0.1.tar.gz
- Upload date:
- Size: 82.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db4d19e173fe1376766d8c8d72748e4981741c2b15b76d9b0b75a812b7b7a748
|
|
| MD5 |
349b20189e581c2d0e53604558917132
|
|
| BLAKE2b-256 |
178961e508fcb28226d17623620aca2a8c9bb233a35ba8cef59c083edd376d20
|
Provenance
The following attestation bundles were made for nemlig_shopper-1.0.1.tar.gz:
Publisher:
publish.yml on mhattingpete/nemlig-shopper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nemlig_shopper-1.0.1.tar.gz -
Subject digest:
db4d19e173fe1376766d8c8d72748e4981741c2b15b76d9b0b75a812b7b7a748 - Sigstore transparency entry: 926796391
- Sigstore integration time:
-
Permalink:
mhattingpete/nemlig-shopper@1eb66ce32e9c625c3c5591434e1a3ad946c63fea -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/mhattingpete
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1eb66ce32e9c625c3c5591434e1a3ad946c63fea -
Trigger Event:
release
-
Statement type:
File details
Details for the file nemlig_shopper-1.0.1-py3-none-any.whl.
File metadata
- Download URL: nemlig_shopper-1.0.1-py3-none-any.whl
- Upload date:
- Size: 19.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9418eef65809d47f1e77ec1ad69b06e2f591779aaec5bd9a4d37252a120887b
|
|
| MD5 |
8691b4a45a3e707e0a02848c83ff57fc
|
|
| BLAKE2b-256 |
87692a992d5f86255b773c1d80f07f9399c5013f568f758f83aa4bd4bf8300f1
|
Provenance
The following attestation bundles were made for nemlig_shopper-1.0.1-py3-none-any.whl:
Publisher:
publish.yml on mhattingpete/nemlig-shopper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nemlig_shopper-1.0.1-py3-none-any.whl -
Subject digest:
b9418eef65809d47f1e77ec1ad69b06e2f591779aaec5bd9a4d37252a120887b - Sigstore transparency entry: 926796392
- Sigstore integration time:
-
Permalink:
mhattingpete/nemlig-shopper@1eb66ce32e9c625c3c5591434e1a3ad946c63fea -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/mhattingpete
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1eb66ce32e9c625c3c5591434e1a3ad946c63fea -
Trigger Event:
release
-
Statement type: