KosmoKrator

other

Google Maps CLI for AI Agents

Use the Google Maps CLI from KosmoKrator to call Google Maps tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

7 functions 7 read 0 write API key auth

Google Maps CLI Setup

Google Maps can be configured headlessly with `kosmokrator integrations:configure google-maps`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure google-maps --set api_key="$GOOGLE_MAPS_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor google-maps --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
api_key GOOGLE_MAPS_API_KEY Secret secret yes API Key
url GOOGLE_MAPS_URL URL url no API Base URL

Call Google Maps Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call google-maps.google_maps_geocode_address '{
  "address": "example_address",
  "components": "example_components",
  "region": "example_region",
  "language": "example_language"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:google-maps google_maps_geocode_address '{
  "address": "example_address",
  "components": "example_components",
  "region": "example_region",
  "language": "example_language"
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs google-maps --json
kosmo integrations:docs google-maps.google_maps_geocode_address --json
kosmo integrations:schema google-maps.google_maps_geocode_address --json
kosmo integrations:search "Google Maps" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Google Maps.

google-maps.google_maps_geocode_address

Read read

Convert a street address into geographic coordinates and place details using Google Maps geocoding.

Parameters
address, components, region, language

Generic CLI call

kosmo integrations:call google-maps.google_maps_geocode_address '{"address":"example_address","components":"example_components","region":"example_region","language":"example_language"}' --json

Provider shortcut

kosmo integrations:google-maps google_maps_geocode_address '{"address":"example_address","components":"example_components","region":"example_region","language":"example_language"}' --json

google-maps.google_maps_reverse_geocode

Read read

Convert latitude and longitude coordinates into street addresses using Google Maps reverse geocoding.

Parameters
latitude, longitude, components, language, result_type, location_type

Generic CLI call

kosmo integrations:call google-maps.google_maps_reverse_geocode '{"latitude":1,"longitude":1,"components":"example_components","language":"example_language","result_type":"example_result_type","location_type":"example_location_type"}' --json

Provider shortcut

kosmo integrations:google-maps google_maps_reverse_geocode '{"latitude":1,"longitude":1,"components":"example_components","language":"example_language","result_type":"example_result_type","location_type":"example_location_type"}' --json

google-maps.google_maps_search_places

Read read

Search for places with a text query using Google Maps Places search.

Parameters
query, location, radius, language, type, open_now, min_price, max_price

Generic CLI call

kosmo integrations:call google-maps.google_maps_search_places '{"query":"example_query","location":"example_location","radius":1,"language":"example_language","type":"example_type","open_now":true,"min_price":1,"max_price":1}' --json

Provider shortcut

kosmo integrations:google-maps google_maps_search_places '{"query":"example_query","location":"example_location","radius":1,"language":"example_language","type":"example_type","open_now":true,"min_price":1,"max_price":1}' --json

google-maps.google_maps_get_place_details

Read read

Get detailed information about a specific Google Maps place by Place ID.

Parameters
place_id, fields, language, region, reviews_no_translations, reviews_sort

Generic CLI call

kosmo integrations:call google-maps.google_maps_get_place_details '{"place_id":"example_place_id","fields":"example_fields","language":"example_language","region":"example_region","reviews_no_translations":"example_reviews_no_translations","reviews_sort":"example_reviews_sort"}' --json

Provider shortcut

kosmo integrations:google-maps google_maps_get_place_details '{"place_id":"example_place_id","fields":"example_fields","language":"example_language","region":"example_region","reviews_no_translations":"example_reviews_no_translations","reviews_sort":"example_reviews_sort"}' --json

google-maps.google_maps_get_directions

Read read

Get directions between an origin and destination using Google Maps Directions API.

Parameters
origin, destination, mode, waypoints, alternatives, avoid, language, units, departure_time, arrival_time, transit_mode, transit_routing_preference

Generic CLI call

kosmo integrations:call google-maps.google_maps_get_directions '{"origin":"example_origin","destination":"example_destination","mode":"example_mode","waypoints":"example_waypoints","alternatives":true,"avoid":"example_avoid","language":"example_language","units":"example_units"}' --json

Provider shortcut

kosmo integrations:google-maps google_maps_get_directions '{"origin":"example_origin","destination":"example_destination","mode":"example_mode","waypoints":"example_waypoints","alternatives":true,"avoid":"example_avoid","language":"example_language","units":"example_units"}' --json

google-maps.google_maps_get_distance_matrix

Read read

Calculate travel distances and durations between multiple origins and destinations.

Parameters
origins, destinations, mode, language, units, departure_time, arrival_time, avoid, transit_mode, transit_routing_preference

Generic CLI call

kosmo integrations:call google-maps.google_maps_get_distance_matrix '{"origins":"example_origins","destinations":"example_destinations","mode":"example_mode","language":"example_language","units":"example_units","departure_time":"example_departure_time","arrival_time":"example_arrival_time","avoid":"example_avoid"}' --json

Provider shortcut

kosmo integrations:google-maps google_maps_get_distance_matrix '{"origins":"example_origins","destinations":"example_destinations","mode":"example_mode","language":"example_language","units":"example_units","departure_time":"example_departure_time","arrival_time":"example_arrival_time","avoid":"example_avoid"}' --json

google-maps.google_maps_get_current_user

Read read

Get geolocation data for the current requester and verify Google Maps API credentials.

Parameters
none

Generic CLI call

kosmo integrations:call google-maps.google_maps_get_current_user '{}' --json

Provider shortcut

kosmo integrations:google-maps google_maps_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

google-maps.google_maps_geocode_address

Convert a street address into geographic coordinates and place details using Google Maps geocoding.

Operation
Read read
Schema command
kosmo integrations:schema google-maps.google_maps_geocode_address --json
ParameterTypeRequiredDescription
address string yes Street address to geocode.
components object no Optional component filters such as {"country": "US"}.
region string no Optional region bias such as "us".
language string no Optional language code such as "en".

google-maps.google_maps_reverse_geocode

Convert latitude and longitude coordinates into street addresses using Google Maps reverse geocoding.

Operation
Read read
Schema command
kosmo integrations:schema google-maps.google_maps_reverse_geocode --json
ParameterTypeRequiredDescription
latitude number yes Latitude coordinate.
longitude number yes Longitude coordinate.
components object no Optional component filters.
language string no Optional language code.
result_type string no Optional result type filter such as "street_address".
location_type string no Optional location type filter such as "ROOFTOP".

google-maps.google_maps_search_places

Search for places with a text query using Google Maps Places search.

Operation
Read read
Schema command
kosmo integrations:schema google-maps.google_maps_search_places --json
ParameterTypeRequiredDescription
query string yes Text search query such as "restaurants in Sydney".
location string no Optional location bias as "lat,lng".
radius number no Optional radius in meters.
language string no Optional language code.
type string no Optional place type such as "restaurant".
open_now boolean no Whether to return only places open now.
min_price integer no Optional minimum price level from 0 to 4.
max_price integer no Optional maximum price level from 0 to 4.

google-maps.google_maps_get_place_details

Get detailed information about a specific Google Maps place by Place ID.

Operation
Read read
Schema command
kosmo integrations:schema google-maps.google_maps_get_place_details --json
ParameterTypeRequiredDescription
place_id string yes Google Place ID.
fields array no Optional list of fields to include.
language string no Optional language code.
region string no Optional region code.
reviews_no_translations string no Set to "true" to disable review translations.
reviews_sort string no Review sort order such as "most_relevant" or "newest".

google-maps.google_maps_get_directions

Get directions between an origin and destination using Google Maps Directions API.

Operation
Read read
Schema command
kosmo integrations:schema google-maps.google_maps_get_directions --json
ParameterTypeRequiredDescription
origin string yes Starting point as address, Place ID, or "lat,lng".
destination string yes Destination as address, Place ID, or "lat,lng".
mode string no Travel mode: driving, walking, bicycling, or transit.
waypoints string no Optional pipe-separated waypoints.
alternatives boolean no Whether to return alternative routes.
avoid array no Avoid options such as tolls, highways, ferries.
language string no Optional language code.
units string no Unit system: metric or imperial.
departure_time string no Departure time as "now" or Unix timestamp.
arrival_time string no Arrival time as Unix timestamp for transit.
transit_mode string no Transit modes such as bus, subway, train, tram, or rail.
transit_routing_preference string no Transit preference: less_walking or fewer_transfers.

google-maps.google_maps_get_distance_matrix

Calculate travel distances and durations between multiple origins and destinations.

Operation
Read read
Schema command
kosmo integrations:schema google-maps.google_maps_get_distance_matrix --json
ParameterTypeRequiredDescription
origins array yes Origin addresses or "lat,lng" strings.
destinations array yes Destination addresses or "lat,lng" strings.
mode string no Travel mode: driving, walking, bicycling, or transit.
language string no Optional language code.
units string no Unit system: metric or imperial.
departure_time string no Departure time as "now" or Unix timestamp.
arrival_time string no Arrival time as Unix timestamp for transit.
avoid array no Avoid options such as tolls, highways, ferries.
transit_mode string no Transit modes as a pipe-separated string.
transit_routing_preference string no Transit preference: less_walking or fewer_transfers.

google-maps.google_maps_get_current_user

Get geolocation data for the current requester and verify Google Maps API credentials.

Operation
Read read
Schema command
kosmo integrations:schema google-maps.google_maps_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.