rami-levy-cli
v0.4.0
Published
Unofficial CLI for Rami Levy product search, orders, and live cart management.
Maintainers
Readme
Rami Levy CLI
Search products, compare unit prices, inspect previous orders, and manage the live Rami Levy cart from a terminal.
This is an unofficial community project. It is not affiliated with, endorsed by, or supported by Rami Levy. Use it only with your own account and in accordance with Rami Levy's terms of use. The private website APIs it relies on may change without notice.
Install — about 2 minutes
Requirements: Node.js 20 or newer, npm, and Google Chrome.
Install the command.
npm install --global rami-levy-cliConfirm the installation.
rami --versionExpected output:
0.4.0
If you previously installed the CLI from a source checkout, replace its npm link once:
npm unlink --global rami-levy-har-cli
npm install --global rami-levy-cliSign in once
Start login.
rami auth loginSign in inside the temporary Chrome window and select a delivery store.
Return to the same terminal and press Enter.
Wait for
Authentication ready.The shortened success output looks like:Opening an isolated Rami Levy login window… Sign in normally, complete any verification, select a delivery store, then return here and press Enter. Capturing authenticated Rami Levy requests… ✓ Captured and verified read-only search, cart, and orders access ✓ Removed temporary Chrome data ✓ Saved authentication to ~/.config/rami-levy/profile.json Authentication ready. Authentication: verified
The user presses Enter directly; no assistant or browser extension is needed. Chrome can be closed during normal CLI use.
Find a product
Search the store selected on the Rami Levy account:
rami search "מי עדן סודה"Compare compatible package sizes by unit price:
rami search "אקס" --sort unit-priceHuman-readable output:
30 shown · 230 matches · store 331
ID PRICE CONTENT UNIT PRICE BASIS OFFER AVAILABLE NAME
------ ------ --------- ----------- ------------- ---------------------- --------- ----------------------------------------
373555 ₪19.20 2 ליטר ₪9.60/L regular - yes נוזל לניקוי כללי ורצפות אג'קס 2 ליטר
353818 ₪6.67 150 מל ₪44.44/L cart promo ×3 דאו ספריי אקס 3 יח' ב… yes דאודורנט ספריי גוף לגבר אנרכי אקס 150 מ…
353822 ₪16.60 150 מל ₪110.67/L regular דאו ספריי אקס 3 יח' ב… yes דאודורנט ספריי גוף גולד 48 שעות אקס 150…
… … … … … … … …
Cart promo prices are per-item averages at the quantity already in your cart; adding one can change them.
Offers are conditional and affect sorting only when the server-calculated current cart includes a discount.
Unit prices use Rami Levy content metadata, which can be missing or wrong; do not trust them blindly.
Add to cart: rami cart add <product-id> [quantity]Price comparison is a shortcut, not a source of truth:
- A qualified current-cart promotion is included only at its existing cart quantity.
- An offer label alone never changes the comparison price.
- Rami Levy's
gs.Net_Contentmetadata can be missing or wrong. - Liters, kilograms, individual units, and meters are sorted separately.
- Products with unsupported content metadata appear last.
Default search ordering is available products first, then the effective comparison price. Current-cart pricing is used only when the search and cart stores match. Sorting applies only to the rows returned by Rami Levy, not every reported match.
See the current cart
Run:
rami cartThis shortened example was captured from a live cart on July 20, 2026:
25 products · 23 available · 2 unavailable · store 331
ID QTY REGULAR TOTAL LINE TOTAL SAVED AVAILABLE NAME
------ --- ------------- ---------- ------ --------- --------------------------------------------
3 1 ₪5.90 ₪2.90 ₪3.00 yes מלפפון
41 2 ₪11.80 ₪5.80 ₪6.00 yes מלון
353818 3 ₪49.80 ₪20.00 ₪29.80 yes דאודורנט ספריי גוף אנרכי
… … … … … yes 20 other available products
296280 15 - - - no סנו סופט – מגבוני טואלט לחים מארז שלישייה
409743 7 - - - no מי עדן סודה 1.5 ל' (6)
Products after current promotions: ₪726.38
Savings versus regular prices: ₪45.20
Delivery in current quote: ₪35.90
Quoted total with delivery: ₪762.28
Coupons, payment choice, substitutions, and final weighed quantities can still change checkout.Rami Levy recalculates the product lines and current promotions every time the cart is shown. Unavailable products stay visible but are excluded from totals. The current quote is still not a promise of the final card charge.
Change the cart
Copy a product
IDfrom search or cart output.Run one change.
rami cart add 409743 1 rami cart update 409743 7 rami cart remove 409743Check the verified result.
Updated דאודורנט ספריי גוף אנרכי (353818). Verified quantity: 3. Verified line total: ₪20.00 (saved ₪29.80). Cart now has 25 products (23 available, 2 unavailable). Products after current promotions: ₪726.38.
Quantities must be positive and may have at most two decimal places.
See previous orders
rami orders
rami orders --page 2Output is a compact table with order ID, status, total, and supply time:
7 orders · page 1 of 3
ID STATUS TOTAL SUPPLY
-- --------- ------- ----------------
42 delivered ₪120.25 2026-07-20 10:00Use JSON in scripts
Add --json to any result-producing command:
rami search "מי עדן סודה" --json
rami cart --json
rami orders --page 2 --json
rami status --jsonHuman output may evolve. JSON is the stable machine-readable interface.
Command reference
Authentication:
rami auth login Sign in through temporary Chrome
rami auth status Show local authentication status
rami auth logout Remove the selected local profile
rami auth import <file.har> Import authentication from a sensitive HAR
rami status Show profile and capability statusShopping:
rami search <query> Search the current server store
rami search <query> --sort unit-price
rami search <query> --store 331 Override the store for one search
rami orders [--page <number>] [--filter <value>]
List previous orders
rami cart [list] List the current server cart
rami cart add <id> [quantity] Add a product; quantity defaults to 1
rami cart update <id> <quantity> Set a product quantity
rami cart remove <id> Remove a productGlobal options:
--json Print stable JSON
--profile <file> Select another authentication profile
-h, --help Show help
--version Show versionRun rami help <command> for command-specific help.
Authentication safety
Login uses a new temporary Chrome profile. Request observation starts only after the user presses Enter, so password and OTP submission happen first.
The CLI then:
- Captures requests only from
https://www.rami-levy.co.ilandhttps://www-api.rami-levy.co.il. - Retains only
authorization,EcomToken,cookie, andlocaleheaders. - Confirms that both origin tokens belong to one account.
- Verifies search, cart, and orders with read-only requests.
- Closes Chrome and deletes temporary data before saving the reduced profile.
The saved profile is ~/.config/rami-levy/profile.json with mode 0600.
During capture, Chrome may deliver a request object containing a body; the CLI
does not inspect, log, or retain that body.
A forced process kill or power loss can interrupt cleanup. Any remaining browser
profile is confined to a rami-auth-* directory under the operating system's
temporary directory.
If Chrome is installed in a nonstandard location:
RAMI_CHROME_PATH=/path/to/chrome rami auth loginProfile selection
Profile precedence is:
--profile <file>RAMI_PROFILE~/.config/rami-levy/profile.json
Use one profile path per Rami Levy account. Login refuses to replace a profile belonging to another account. To remove a custom profile, use the same selection:
rami auth logout --profile /path/to/profile.jsonrami status and rami auth status read local state only. They do not contact
Rami Levy, so they cannot detect credentials revoked before their expiry time.
Manual HAR fallback
Use this only when interactive login cannot run.
Sign in to Rami Levy in Chrome.
Open Chrome DevTools → Network and reload the page.
Export a HAR with sensitive data.
Protect and import it.
chmod 600 ~/Downloads/www.rami-levy.co.il.har rami auth import ~/Downloads/www.rami-levy.co.il.har
The CLI ignores captured cart contents and saves only the reduced authentication profile. The original HAR still contains active credentials; keep it private.
Cart consistency
The server is the cart authority. The CLI has no cart cache or snapshot. Every cart command fetches the latest server cart first, including changes made on the website.
A mutation fetches the complete cart, applies one change, submits the full cart, fetches it again, and verifies every product and quantity. Store, delivery date, and club status come from the authenticated customer response.
The Rami Levy write API has no conditional version. Website and CLI writes can race if they happen at the same time. Finish a change in one client before using the other.
Exit codes
0: success1: authentication, network, server, or runtime failure2: invalid command, option, or value
Results go to stdout. Errors and progress go to stderr.
Update
npm update --global rami-levy-cliUninstall
npm uninstall --global rami-levy-cliLicense
MIT. See LICENSE.
