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.
cart clear empties your entire cart in a single GET + PUT — it removes all product lines atomically. It is the recommended first step before building a fresh basket with cart set-many, ensuring you start from a known empty state.
Synopsis
Flags
| Flag | Default | Description |
|---|---|---|
--wh <code> | config/mad1 | Warehouse code |
--lang <code> | config/es | Language code (es, en, ca, eu, vai) |
--json | false | Emit raw cart JSON (PUT response) |
Examples
Human output
On success, the command prints how many products were removed:--json, the raw PUT response (the new empty cart object) is emitted to stdout instead.
The recommended pattern for replacing an existing basket is to run
cart clear first, then cart set-many -f basket.txt. This guarantees the resulting cart contains exactly the products in your file, with no leftover lines from a previous session. If you only want to add or adjust specific items without wiping the rest, use cart set-many directly — it applies changes on top of whatever is already in the cart.