Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ivorpad/mercadona-cli/llms.txt

Use this file to discover all available pages before exploring further.

Mercadona CLI is an unofficial, single-binary Go tool for tienda.mercadona.es. Search the catalog anonymously, price a shopping list, manage your cart, and drive the full checkout flow — all from the terminal, with --json output designed for scripts and AI agents.

Installation

Install via npm, curl, or build from source. One binary, no runtime dependencies.

Quickstart

Search products, price a basket, and explore the catalog in under five minutes.

Authentication

Import a browser session via HAR export for headless, token-refreshing auth.

Command Reference

Every command, flag, and JSON output shape documented from source.

What you can do

Search & Browse

Full-text product search via Algolia — no login required. Filter by category or exclude frozen/canned items with --fresh.

Batch Pricing

Price up to ~100 search terms in a single request with batch. Pipe a plain-text shopping list and get back product ids and prices.

Cart Management

Add, set, or replace your whole basket in one atomic write with cart set-many. A spending guard refuses over-budget writes before they happen.

Checkout Flow

Create a checkout, browse delivery slots, attach an address, and submit — or stop at any reversible step for review.

Agent-Friendly Output

Every command supports --json. Data goes to stdout, logs to stderr, exit code 1 on error — safe to pipe and parse.

Claude Skill

A bundled mercadona-shop Claude Code skill drives the full shopping workflow with safety gates and spending caps.

Get started in three steps

1

Install the binary

npm install -g @ivorpad/mercadona
Or use the curl installer for macOS/Linux. See Installation for all options.
2

Search the catalog (no login needed)

mercadona search queso --limit 5
mercadona batch -f - <<'EOF'
leche entera
huevos
aceite de oliva
EOF
Product search uses Algolia and works from any IP without credentials.
3

Authenticate for cart & checkout

Export a HAR file from your browser after logging in to tienda.mercadona.es, then:
mercadona import-har --file tienda.mercadona.es.har
mercadona whoami
The CLI extracts your refresh token and auto-renews sessions headlessly from that point on. See Authentication.
This is an unofficial tool. Mercadona has no public API. Use at a reasonable request rate and bring your own credentials. This CLI talks to the same HTTP endpoints the website uses.

Build docs developers (and LLMs) love