gmaps-cli
v1.3.0
Published
Lightweight CLI for Google Maps Places and Routes APIs
Maintainers
Readme
gmaps-cli
Lightweight CLI for Google Maps via Grounding Lite. Runs on Bun.
Install
bun install -g gmaps-cliSetup
- Enable Maps Grounding Lite in your Google Cloud Console
- Create an API key
- Set the environment variable:
export GOOGLE_MAPS_API_KEY=your-api-keyUsage
Search for places
gmaps 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) | — |
Compute a route
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 |
Output
Both commands output JSON to stdout:
gmaps places "coffee" | jq '.summary'
gmaps route "A" "B" | jq '.route.duration'License
MIT
