Skip to content

jgalea/glovo-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

glovo-cli

Go License Single binary Built by RebelCode

Unofficial CLI for Glovo. Find restaurants, browse menus, and fill your own cart from the terminal.


Overview

glovo is a single Go binary that talks to the same endpoints glovoapp.com uses. It's not a scraper of arbitrary pages — search and cart/order call Glovo's authenticated store API with your own account, and menu reads the server-rendered store page (no account needed). Every command supports --json (data to stdout, logs to stderr) and --toon (fewer tokens, for agents).

Commands

glovo — unofficial CLI for Glovo food delivery

USAGE:
  glovo <command> [flags]

COMMANDS:
  search <query...>         find restaurants near your delivery address
  menu <store-slug|id>      list a restaurant's categories and items
  login [--token|--email a] authenticate with your OWN Glovo account
  cart get <store-id>       show your basket for a store
  cart add <store-id> <product-id> [qty]
  cart set <store-id> <product-id> <qty>   (0 removes)
  cart clear <store-id>
  order <store-id>          dry-run: restaurant, items, fees, total, ETA
  order <store-id> --confirm  place the order (requires captured checkout)

COMMON FLAGS (after the command):
  --json                    emit raw JSON (data → stdout, logs → stderr)
  --toon                    emit TOON (fewer tokens; for agents)

ENV:
  GLOVO_CONFIG_DIR          override ~/.glovo (token cache)

search calls Glovo's authenticated store-search API, so it needs glovo login first, plus delivery coordinates: --lat/--lng, or GLOVO_LAT/GLOVO_LNG, or it falls back to Barcelona centre (--city/--country default to BCN/ES). menu <store-slug> needs no login — it reads Glovo's public, server-rendered store page.

Auth

glovo login supports three paths:

  • --email you@example.com — logs in with your email and password via Glovo's OAuth token endpoint. The password is read from a hidden prompt (or piped: pbpaste | glovo login --email you@example.com), sent once, and never stored — only the returned tokens are. No browser needed. This is the simplest terminal login.
  • --access-token — paste your current access token (from a logged-in browser: DevTools → Application → Cookies → glovo_auth_info). The CLI reads your customer id straight out of the token. Short-lived; re-paste when it expires.
  • --token — paste your glovo_refresh_token from a logged-in browser's Local Storage. Best-effort (the refresh-exchange endpoint isn't fully verified); prefer --email.

Tokens are cached in ~/.glovo/auth.json (override the directory with GLOVO_CONFIG_DIR). The CLI never stores your password. On a 401, set GLOVO_DEBUG=1 to see the server's response.

Cart

cart get|add|set|clear fills your own basket through Glovo's authenticated API:

glovo login
glovo cart add 123456 789012 2   # add 2× a product to a store's basket
glovo cart get 123456
glovo cart set 123456 789012 0   # remove it
glovo cart clear 123456

The CLI fills the cart. It never places an order on its own.

Status: ordering

glovo order <store-id> is a dry-run summary (items, fees, total, ETA) built from your live basket — no request is sent. glovo order <store-id> --confirm is gated behind an explicit flag, but currently returns a "checkout not yet implemented" error: the real order-placement request hasn't been captured from a live checkout yet, so --confirm charges nothing. Browsing, login, and cart-filling all work end to end.

Install

git clone https://github.com/jgalea/glovo-cli.git
cd glovo-cli
go build -o glovo ./cmd/glovo
./glovo version

License

MIT. See LICENSE.

Author: Jean Galea. Unofficial project, not affiliated with or endorsed by Glovo. It talks to the same endpoints glovoapp.com uses in your browser — use it at a sane request rate.

About

Unofficial, agent-friendly CLI for Glovo food delivery: search restaurants, read menus, fill your basket.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages