Lightweight CLI for Google Maps via Grounding Lite. Runs on Bun.
bun install -g gmaps-cli- Enable Maps Grounding Lite in your Google Cloud Console
- Create an API key
- Set the environment variable:
export GOOGLE_MAPS_API_KEY=your-api-keygmaps places "coffee shops in Sydney"
gmaps places "petrol stations" --near "-33.8688,151.2093" --radius 2000
gmaps places "restaurants" --limit 5 --language en --region AU| Flag | Description | Default |
|---|---|---|
--near <lat,lng> |
Bias results to location | — |
--radius <meters> |
Search radius (requires --near) | 5000 |
--limit <n> |
Max results | 10 |
--language <code> |
Language (ISO 639-1) | en |
--region <code> |
Region bias (ISO 3166-1) | — |
gmaps route "JFK Airport" "Manhattan"
gmaps route "Sydney" "Melbourne" --mode drive
gmaps route "Central Park" "Brooklyn Bridge" --mode walk| Flag | Description | Default |
|---|---|---|
--mode <mode> |
drive or walk |
drive |
Both commands output JSON to stdout:
gmaps places "coffee" | jq '.summary'
gmaps route "A" "B" | jq '.route.duration'MIT