Skip to content

deanmikan/gmaps-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gmaps-cli

Lightweight CLI for Google Maps via Grounding Lite. Runs on Bun.

Install

bun install -g gmaps-cli

Setup

  1. Enable Maps Grounding Lite in your Google Cloud Console
  2. Create an API key
  3. Set the environment variable:
export GOOGLE_MAPS_API_KEY=your-api-key

Usage

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors