Interact with Rimi products, favorites, cart, checkout, wallet, and account data from the command line or an AI agent workflow.
rimi is an unofficial command-line interface for the Rimi e-store. It gives you a scriptable way to browse products, manage favorites and cart state, inspect account data, and work with checkout, orders, and wallet flows.
Under the hood, it talks to the same web endpoints the Rimi storefront uses, making it useful both in the terminal and in AI-assisted workflows.
- Python 3.12+
- uv
Install from the GitHub repository:
uv tool install rimi --from git+https://github.com/alex-j-b/rimi-cli.gitAuthenticated commands use a secure local session on your computer. For the operational details, see AGENTS.md.
AI coding agents working with the CLI can capture and persist authenticated browser sessions securely on the local machine without exposing credentials in chat.
Store captured browser headers once:
rimi auth store-headers --file headers.jsonWhen Rimi still recognizes your browser session but stored CLI cookies have gone stale, refresh the local keyring copy:
rimi auth refreshrimi auth refresh visits the Rimi account login endpoint with the stored browser-session headers, follows the same silent session refresh the storefront uses, stores the updated cookies back in the system keyring, and verifies the account with account whoami. If it reaches the external SSO login page, open Rimi in a browser and recapture authenticated headers with rimi auth instructions.
Inspect the command tree:
rimi --help
rimi products --help
rimi cart show --helpCatalog examples:
rimi products categories
rimi products list --category-id SH-6-6-3 --page 1 --page-size 80 --sort priceunit-desc
rimi products get 4006297Authenticated account/cart examples:
rimi account whoami
rimi account profile
rimi cart show
rimi cart update-item 4006297 --quantity 2Favorites examples:
rimi favorites categories
rimi favorites list --category-id SH-12 --page 0
rimi favorites add 4006297
rimi favorites remove 4006297Checkout and wallet examples:
rimi checkout time-slots --date 2026-05-01
rimi checkout choose-time-slot <time-id>
rimi checkout prices --cart-id <cart-id>
rimi checkout payment-methods --cart-id <cart-id>
rimi wallet balance
rimi wallet apply 3.71
rimi orders currentEvery command also supports:
--raw # print the unprocessed response body
--output <path> # write raw output to a file; only valid with --raw| Area | Commands |
|---|---|
| Account | account whoami, account profile |
| Cart | cart show, cart update-item, cart recommendations |
| Checkout | checkout time-slots, checkout choose-time-slot, checkout prices, checkout payment-methods |
| Favorites | favorites categories, favorites list, favorites add, favorites remove |
| Orders | orders current |
| Products | products categories, products list, products get |
| Wallet | wallet balance, wallet apply |
Public catalog commands may work without a signed-in session. Commands that read or mutate account, favorites, cart, checkout, orders, or wallet state require valid headers from your own signed-in Rimi session.
Clone the repository and install it as an editable uv tool:
git clone https://github.com/<owner>/<repo>.git rimi
cd rimi
uv tool install --editable .Run the CLI from the working tree without installing it globally:
uv run rimi --help
python -m www_rimi_ee --helpCommand definitions live under commands/<command>/command.yaml, with request shaping in processors/pre.py, output shaping in processors/post.py, fixture evidence in fixtures/, and approved JSON contracts in goldens/.
Install dev/test dependencies, run the offline contract tests, and check formatting/linting:
uv sync --extra dev
uv run --extra dev python -m pytest -q
uv run --extra dev ruff check .
uv run --extra dev ruff format --check .Run one command's contract test:
uv run --extra dev python -m pytest -q commands/products_list/tests/test_command.pyReplay one command from fixtures:
AUTOCLI_TEST_MODE=true rimi products categories --replayThe offline contract tests replay captured fixtures and compare post-processed JSON against approved goldens. They should not need live Rimi access.
- Authenticated requests depend on headers you provide through the system keyring or the
PLAYWRIGHT_HEADERS_JSONprocess environment override. - Treat browser cookies, authorization headers, CSRF/XSRF tokens, cart IDs, order IDs, and profile data as secrets.
- Use this project only with accounts and sessions you are authorized to access, and review Rimi's current terms before automation.
This project was built with AutoCLI, a toolkit for creating editable site-specific CLIs.
MIT License. See LICENSE.
