swiggy-cart

Installation
SKILL.md

swiggy-cart

Carts live on Swiggy's side, keyed to the account. Food and Instamart carts are separate. Everything here except clearing is safe to re-run; retrying the same add-to-cart does not double-add.

Rules

  1. Read the cart at the start of every turn that touches it, and again before any checkout. The user may have edited it in the Swiggy app; prices and stock change between turns. Never trust what you remember.
  2. Food: one restaurant per cart. Adding from a second restaurant flushes the first. Before doing that, tell the user what they will lose and get a yes.
  3. Instamart: upstream update_cart replaces the whole cart. Use swiggy instamart add (it reads the cart and merges) for "add X"; use set-cart only when the user wants exactly that list. Sending only the new item through set-cart silently deletes the rest.
  4. Use the ids the search gave you, verbatim. Food needs menu_item_id (from search-menu/menu); Instamart needs the variation's spinId (+ skuId). Names and productId are not accepted.
  5. A coupon counts as applied only when the cart shows a positive discount. Swiggy auto-suggests coupons with coupon_discount: 0; do not tell the user they saved money unless the number is > 0.
  6. Quantity changes on customised Food items need a decision. If the item has variants/addons, ask whether the extra unit gets the same add-ons before sending the update; do not silently replicate them.

Read

swiggy food cart --json --no-interactive           # data.data.items[], pricing.to_pay, offers, availablePaymentMethods
swiggy instamart cart --json --no-interactive      # data.items[], billBreakdown.toPay, unserviceableItems, paymentOptions
Installs
5
GitHub Stars
1
First Seen
Apr 28, 2026
swiggy-cart — hktitan/swiggy-cli