https://github.com/nikuscs/continentes
Fast CLI for browsing Continente online supermarket products — LLM-ready, works with Claude Code, Codex, OpenClaw, and AI agents. Search, prices, nutrition, categories, stores. Product ordering planned.
https://github.com/nikuscs/continentes
cli continente grocery portugal rust sfcc supermarket
Last synced: 21 days ago
JSON representation
Fast CLI for browsing Continente online supermarket products — LLM-ready, works with Claude Code, Codex, OpenClaw, and AI agents. Search, prices, nutrition, categories, stores. Product ordering planned.
- Host: GitHub
- URL: https://github.com/nikuscs/continentes
- Owner: nikuscs
- License: mit
- Created: 2026-03-22T19:16:05.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-05-12T10:38:10.000Z (about 1 month ago)
- Last Synced: 2026-05-12T12:32:24.144Z (about 1 month ago)
- Topics: cli, continente, grocery, portugal, rust, sfcc, supermarket
- Language: Rust
- Size: 269 KB
- Stars: 4
- Watchers: 0
- Forks: 1
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# 🛒 cnt
[](https://github.com/nikuscs/continentes/actions/workflows/ci.yml)
[](https://github.com/nikuscs/continentes/releases)
[](LICENSE)
**Fast CLI for browsing [Continente online](https://www.continente.pt) supermarket products, optimized for LLM consumption. Works as a skill for [Claude Code](https://docs.anthropic.com/en/docs/claude-code), [Claude.ai](https://claude.ai), [OpenAI Codex](https://openai.com/index/openai-codex/), [OpenClaw](https://github.com/openclaw/openclaw), and any AI agent. Search products, compare prices, inspect nutritional info, browse categories, and find nearby stores — with product ordering planned for the future.**
> **Disclaimer:** This project is for **educational purposes and AI automation research only**.
> The authors are not responsible for any misuse or for any damages resulting from the use of this tool.
> Users are solely responsible for ensuring compliance with applicable laws and the terms of service
> of any websites accessed. This software is provided "as-is" without warranty of any kind.
>
> This project is not affiliated with Continente or Sonae MC.
> **Note:** This project was partially developed with AI assistance and may contain bugs or unexpected behavior. Use at your own risk.
## Features
- Search 50,000+ products with brand, price, and dietary filters
- Full product details with EAN/barcode, nutritional info, and allergens
- Browse 251 product categories (14 top-level, ~100 L2, ~137 L3)
- Current weekly flyers and catalogs (iPaper integration)
- Search autocomplete suggestions
- Find 228 stores across Portugal with GPS coordinates
- 6 dietary filters: vegan, vegetarian, gluten-free, lactose-free, sugar-free, bio
- Multiple output formats: table, JSON, compact (TSV)
- No authentication required
## Installation
### From source
```bash
cargo install --git https://github.com/nikuscs/continentes
```
### Pre-built binaries
Download from [Releases](https://github.com/nikuscs/continentes/releases):
| Platform | File |
|----------|------|
| macOS (Apple Silicon) | `cnt-macos-arm64.tar.gz` |
| Linux (x64) | `cnt-linux-x64.tar.gz` |
| Linux (ARM64) | `cnt-linux-arm64.tar.gz` |
```bash
tar -xzf cnt-*.tar.gz && chmod +x cnt && sudo mv cnt /usr/local/bin/
```
## Usage
### Search products
```bash
cnt search "leite" # basic search
cnt search "cerveja" --brand "Super Bock" # filter by brand
cnt search "arroz" --price-min 1 --price-max 3 # price range
cnt search "leite" --vegan --sort price-low-to-high # dietary + sort
cnt search "bolachas" --gluten-free --page 2 # paginate
```
### Product details
```bash
cnt product 6879912 # basic info
cnt product 6879912 --nutrition # include nutritional data
```
```
Leite UHT Meio Gordo Continente
===============================
ID: 6879912
Brand: Continente
Price: 0,86€
Unit Price: 0,86€/lt
Package: emb. 1 lt
Rating: 3.9
Category: Laticínios e Ovos > Leite > Leite Meio Gordo
EAN: 5601312508007
Badge: Produzido em Portugal
```
### Browse categories
```bash
cnt browse frescos # by name (fuzzy match)
cnt browse laticinios-leite # by exact cgid
cnt browse "cerveja" --sort unit-price # with sorting
```
### Search suggestions
```bash
cnt suggest "arroz" # autocomplete (min 5 chars)
```
### Find stores
```bash
cnt stores --lat 38.7 --lon -9.1 # Lisbon area
cnt stores --lat 41.1 --lon -8.6 --radius 20 # Porto, 20km
```
### List categories
```bash
cnt categories # tree view
cnt categories --format json # machine-readable
```
### Browse flyers
```bash
cnt flyers # current weekly flyers
cnt flyers --format json # machine-readable
```
## Output formats
```bash
cnt search "leite" # table (default)
cnt search "leite" --format json # JSON
cnt search "leite" --format compact # TSV for piping
```
```bash
# Pipe to jq
cnt search "leite" --format json | jq '.products[].name'
# Pipe to other tools
cnt search "leite" --format compact | sort -t$'\t' -k2 -n
```
## Dietary filters
| Flag | Description |
|------|-------------|
| `--vegan` | Vegan products only |
| `--vegetarian` | Vegetarian products only |
| `--gluten-free` | Gluten-free only |
| `--lactose-free` | Lactose-free only |
| `--sugar-free` | Sugar-free only |
| `--bio` | Organic/biological only |
## Sort options
| Value | Description |
|-------|-------------|
| `relevance` | Default ranking |
| `price-low-to-high` | Cheapest first |
| `price-high-to-low` | Most expensive first |
| `unit-price` | By price per unit (kg/lt) |
| `name-asc` | Name A-Z |
| `name-desc` | Name Z-A |
## Configuration
Place at `./continente.toml` or `~/.config/continente/continente.toml`:
```toml
[http]
timeout_secs = 30
retries = 3
delay_ms = 100
[output]
format = "table" # table, json, compact
```
## Global options
| Flag | Env var | Description |
|------|---------|-------------|
| `--format ` | | Output: table, json, compact |
| `-v, --verbose` | | Debug logging |
| `--config ` | `CONTINENTE_CONFIG` | Config file path |
## AI Agents
If you are an AI agent (Claude Code, Claude.ai, OpenAI Codex, OpenClaw, or any tool-calling agent), you can use `cnt` as a skill to search Portuguese supermarket products. Download the binary and call it directly from your tool/shell integration. A `SKILL.md` file is included for Claude Code skill registration.
### Quick setup
Download the pre-compiled binary for your platform from [Releases](https://github.com/nikuscs/continentes/releases) and place it in your `PATH`.
### Searching products
```bash
# Search with JSON output for parsing
cnt search "leite" --format json
# Filter by dietary requirements
cnt search "queijo" --vegan --format json
# Get full product details with nutrition
cnt product 6879912 --nutrition --format json
# Find cheapest option
cnt search "azeite" --sort unit-price --format json
```
### Building a shopping list
```bash
# Search multiple products and extract prices
cnt search "leite" --format json | jq '.products[:3] | .[] | {id, name, price}'
cnt search "pão" --format json | jq '.products[:3] | .[] | {id, name, price}'
```
### Finding stores
```bash
# Find nearest stores to coordinates
cnt stores --lat 38.7 --lon -9.1 --format json | jq '.[0] | {name, address, city}'
```
### Tips for agents
- Use `--format json` for structured output you can parse
- Product IDs are numeric strings (e.g., `6879912`) — extract from search results
- Use `--nutrition` flag on `product` command for full nutritional data
- Use `--sort unit-price` for best value comparisons
- Dietary filters can be combined: `--vegan --gluten-free --bio`
- Categories use internal `cgid` values — use `cnt categories --format json` to get the mapping
- No authentication needed — all endpoints are public
Feel free to copy and adapt this tool's interface into your own skill definitions or MCP server configurations.
## How it works
The CLI interacts with Continente's Salesforce Commerce Cloud (SFCC) storefront controllers. These are the same endpoints the website uses — no private APIs, no authentication, no scraping of rendered pages. Product data is extracted from structured `data-` attributes and JSON responses.
All endpoint details are documented inline in `src/api/client.rs`.
## Related Projects
- [⚖️ lauyer](https://github.com/nikuscs/lauyer) — Fast CLI for searching Portuguese court jurisprudence and legislation
- [🕷️ crauler](https://github.com/nikuscs/crauler) — Web crawler with proxy routing and HTML→Markdown
- [🦎 amz-crawler](https://github.com/nikuscs/amz-crawler) — Amazon product crawler with TLS fingerprinting
- [🕹️ scrauper](https://github.com/nikuscs/scrauper) — Multi-threaded ScreenScraper.fr scraper for ES-DE
## License
MIT — see `LICENSE`.