KosmoKrator

data

NASA CLI for AI Agents

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

NASA CLI Setup

NASA can be configured headlessly with `kosmokrator integrations:configure nasa`.

Install, configure, and verify
# 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 nasa --enable --read allow --write ask --json
kosmokrator integrations:doctor nasa --json
kosmokrator integrations:status --json

Credentials

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

No credentials are required.

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call nasa.nasa_get_apod '{"date":"example_date","start_date":"example_start_date","end_date":"example_end_date","count":1,"thumbs":true}' --json
Provider shortcut
kosmo integrations:nasa nasa_get_apod '{"date":"example_date","start_date":"example_start_date","end_date":"example_end_date","count":1,"thumbs":true}' --json

Discovery

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

Discovery commands
kosmo integrations:docs nasa --json
kosmo integrations:docs nasa.nasa_get_apod --json
kosmo integrations:schema nasa.nasa_get_apod --json
kosmo integrations:search "NASA" --json
kosmo integrations:list --json

Automation Contexts

The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.

CLI Functions

Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.

nasa.nasa_get_apod

Get the NASA Astronomy Picture of the Day (APOD). Returns the daily astronomical image or photo along with an explanation written by a professional astronomer. You can request a specific date or a range of dates.

Read read
Parameters
date, start_date, end_date, count, thumbs
Generic call
kosmo integrations:call nasa.nasa_get_apod '{"date":"example_date","start_date":"example_start_date","end_date":"example_end_date","count":1,"thumbs":true}' --json
Shortcut
kosmo integrations:nasa nasa_get_apod '{"date":"example_date","start_date":"example_start_date","end_date":"example_end_date","count":1,"thumbs":true}' --json

nasa.nasa_get_mars_rover_photos

Get photos from NASA Mars rovers (Curiosity, Opportunity, Spirit, Perseverance). Query by sol (Martian day) or Earth date, and optionally filter by camera. Returns photo URLs and metadata.

Read read
Parameters
rover, sol, earth_date, camera, page
Generic call
kosmo integrations:call nasa.nasa_get_mars_rover_photos '{"rover":"example_rover","sol":1,"earth_date":"example_earth_date","camera":"example_camera","page":1}' --json
Shortcut
kosmo integrations:nasa nasa_get_mars_rover_photos '{"rover":"example_rover","sol":1,"earth_date":"example_earth_date","camera":"example_camera","page":1}' --json

nasa.nasa_get_asteroids

Get Near Earth Objects (asteroids) for a date range from NASA. Returns a list of asteroids with their estimated diameter, velocity, distance from Earth, and whether they are potentially hazardous.

Read read
Parameters
start_date, end_date
Generic call
kosmo integrations:call nasa.nasa_get_asteroids '{"start_date":"example_start_date","end_date":"example_end_date"}' --json
Shortcut
kosmo integrations:nasa nasa_get_asteroids '{"start_date":"example_start_date","end_date":"example_end_date"}' --json

nasa.nasa_browse_asteroids

Browse the overall NASA Near Earth Object dataset. Use this when you need asteroid IDs before looking up a specific object.

Read read
Parameters
page, size
Generic call
kosmo integrations:call nasa.nasa_browse_asteroids '{"page":1,"size":1}' --json
Shortcut
kosmo integrations:nasa nasa_browse_asteroids '{"page":1,"size":1}' --json

nasa.nasa_get_asteroid

Get detailed information about a specific Near Earth Object (asteroid) by its NASA ID. Returns orbital data, estimated diameter, close approach history, and hazard assessment.

Read read
Parameters
id
Generic call
kosmo integrations:call nasa.nasa_get_asteroid '{"id":"example_id"}' --json
Shortcut
kosmo integrations:nasa nasa_get_asteroid '{"id":"example_id"}' --json

nasa.nasa_get_donki_events

Get DONKI space-weather events such as CME, CMEAnalysis, GST, IPS, FLR, SEP, MPC, RBE, HSS, WSAEnlilSimulations, or notifications.

Read read
Parameters
type, start_date, end_date, most_accurate_only, complete_entry_only, speed, half_angle, catalog, keyword, location, notification_type
Generic call
kosmo integrations:call nasa.nasa_get_donki_events '{"type":"example_type","start_date":"example_start_date","end_date":"example_end_date","most_accurate_only":true,"complete_entry_only":true,"speed":1,"half_angle":1,"catalog":"example_catalog"}' --json
Shortcut
kosmo integrations:nasa nasa_get_donki_events '{"type":"example_type","start_date":"example_start_date","end_date":"example_end_date","most_accurate_only":true,"complete_entry_only":true,"speed":1,"half_angle":1,"catalog":"example_catalog"}' --json

nasa.nasa_get_epic_images

Get NASA EPIC image metadata for latest images, a specific date, or all available dates from the natural or enhanced collection.

Read read
Parameters
collection, date, all_dates
Generic call
kosmo integrations:call nasa.nasa_get_epic_images '{"collection":"example_collection","date":"example_date","all_dates":true}' --json
Shortcut
kosmo integrations:nasa nasa_get_epic_images '{"collection":"example_collection","date":"example_date","all_dates":true}' --json

nasa.nasa_get_earth_imagery

Get Landsat Earth imagery for a longitude, latitude, date, and optional image dimension.

Read read
Parameters
lon, lat, date, dim
Generic call
kosmo integrations:call nasa.nasa_get_earth_imagery '{"lon":1,"lat":1,"date":"example_date","dim":1}' --json
Shortcut
kosmo integrations:nasa nasa_get_earth_imagery '{"lon":1,"lat":1,"date":"example_date","dim":1}' --json

nasa.nasa_get_earth_assets

Get available Landsat Earth asset dates for a longitude, latitude, optional date, and optional dimension.

Read read
Parameters
lon, lat, date, dim
Generic call
kosmo integrations:call nasa.nasa_get_earth_assets '{"lon":1,"lat":1,"date":"example_date","dim":1}' --json
Shortcut
kosmo integrations:nasa nasa_get_earth_assets '{"lon":1,"lat":1,"date":"example_date","dim":1}' --json

nasa.nasa_search_images

Search the NASA Image and Video Library for space, astronomy, and mission imagery. Returns image URLs, titles, descriptions, and metadata from NASA's vast collection.

Read read
Parameters
q, media_type, page, year_start, year_end, center, keywords, nasa_id
Generic call
kosmo integrations:call nasa.nasa_search_images '{"q":"example_q","media_type":"example_media_type","page":1,"year_start":"example_year_start","year_end":"example_year_end","center":"example_center","keywords":"example_keywords","nasa_id":"example_nasa_id"}' --json
Shortcut
kosmo integrations:nasa nasa_search_images '{"q":"example_q","media_type":"example_media_type","page":1,"year_start":"example_year_start","year_end":"example_year_end","center":"example_center","keywords":"example_keywords","nasa_id":"example_nasa_id"}' --json

nasa.nasa_get_image_asset

Get a NASA Image and Video Library asset manifest by NASA media ID, including downloadable asset URLs.

Read read
Parameters
nasa_id
Generic call
kosmo integrations:call nasa.nasa_get_image_asset '{"nasa_id":"example_nasa_id"}' --json
Shortcut
kosmo integrations:nasa nasa_get_image_asset '{"nasa_id":"example_nasa_id"}' --json

nasa.nasa_get_image_metadata

Get the metadata document for a NASA Image and Video Library media asset by NASA media ID.

Read read
Parameters
nasa_id
Generic call
kosmo integrations:call nasa.nasa_get_image_metadata '{"nasa_id":"example_nasa_id"}' --json
Shortcut
kosmo integrations:nasa nasa_get_image_metadata '{"nasa_id":"example_nasa_id"}' --json

nasa.nasa_get_image_captions

Get caption file locations for a NASA Image and Video Library media asset by NASA media ID.

Read read
Parameters
nasa_id
Generic call
kosmo integrations:call nasa.nasa_get_image_captions '{"nasa_id":"example_nasa_id"}' --json
Shortcut
kosmo integrations:nasa nasa_get_image_captions '{"nasa_id":"example_nasa_id"}' --json

nasa.nasa_get_eonet_events

List NASA EONET v3 natural events with optional filters for status, category, source, limit, and date range.

Read read
Parameters
status, category, source, limit, days, start, end
Generic call
kosmo integrations:call nasa.nasa_get_eonet_events '{"status":"example_status","category":"example_category","source":"example_source","limit":1,"days":1,"start":"example_start","end":"example_end"}' --json
Shortcut
kosmo integrations:nasa nasa_get_eonet_events '{"status":"example_status","category":"example_category","source":"example_source","limit":1,"days":1,"start":"example_start","end":"example_end"}' --json

nasa.nasa_get_eonet_event

Get one NASA EONET v3 natural event by event ID, including geometries, categories, and sources.

Read read
Parameters
id
Generic call
kosmo integrations:call nasa.nasa_get_eonet_event '{"id":"example_id"}' --json
Shortcut
kosmo integrations:nasa nasa_get_eonet_event '{"id":"example_id"}' --json

nasa.nasa_get_eonet_categories

List NASA EONET v3 natural event categories for filtering event searches.

Read read
Parameters
none
Generic call
kosmo integrations:call nasa.nasa_get_eonet_categories '{}' --json
Shortcut
kosmo integrations:nasa nasa_get_eonet_categories '{}' --json

nasa.nasa_get_eonet_sources

List NASA EONET v3 natural event sources for filtering event searches.

Read read
Parameters
none
Generic call
kosmo integrations:call nasa.nasa_get_eonet_sources '{}' --json
Shortcut
kosmo integrations:nasa nasa_get_eonet_sources '{}' --json

Function Schemas

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

nasa.nasa_get_apod 5 parameters
Schema command
kosmo integrations:schema nasa.nasa_get_apod --json
ParameterTypeRequiredDescription
date string no A specific date in YYYY-MM-DD format (defaults to today).
start_date string no Start date for a date range in YYYY-MM-DD format. Use with end_date to get multiple APOD entries.
end_date string no End date for a date range in YYYY-MM-DD format. Must be used together with start_date.
count integer no Return this many random APOD entries. Do not combine with date or date ranges.
thumbs boolean no When true, include thumbnail URLs for video entries when NASA provides them.
nasa.nasa_get_mars_rover_photos 5 parameters
Schema command
kosmo integrations:schema nasa.nasa_get_mars_rover_photos --json
ParameterTypeRequiredDescription
rover string yes Rover name: "curiosity", "opportunity", "spirit", or "perseverance".
sol integer no The sol (Martian day) number. Use this OR earth_date, not both.
earth_date string no Earth date in YYYY-MM-DD format. Use this OR sol, not both.
camera string no Camera abbreviation: FHAZ, RHAZ, MAST, CHEMCAM, MAHLI, MARDI, NAVCAM, PANCAM, MINITES, etc.
page integer no Page number for pagination (default 1, 25 photos per page).
nasa.nasa_get_asteroids 2 parameters
Schema command
kosmo integrations:schema nasa.nasa_get_asteroids --json
ParameterTypeRequiredDescription
start_date string no Start date in YYYY-MM-DD format (defaults to today).
end_date string no End date in YYYY-MM-DD format (max 7 days after start_date).
nasa.nasa_browse_asteroids 2 parameters
Schema command
kosmo integrations:schema nasa.nasa_browse_asteroids --json
ParameterTypeRequiredDescription
page integer no Optional page number.
size integer no Optional page size.
nasa.nasa_get_asteroid 1 parameters
Schema command
kosmo integrations:schema nasa.nasa_get_asteroid --json
ParameterTypeRequiredDescription
id string yes The asteroid's unique NASA ID (e.g., "2534304"). You can find IDs using the nasa_get_asteroids tool.
nasa.nasa_get_donki_events 11 parameters
Schema command
kosmo integrations:schema nasa.nasa_get_donki_events --json
ParameterTypeRequiredDescription
type string yes DONKI event type: CME, CMEAnalysis, GST, IPS, FLR, SEP, MPC, RBE, HSS, WSAEnlilSimulations, or notifications.
start_date string no Start date in YYYY-MM-DD format.
end_date string no End date in YYYY-MM-DD format.
most_accurate_only boolean no CMEAnalysis filter for most accurate results.
complete_entry_only boolean no CMEAnalysis filter for complete entries.
speed integer no CMEAnalysis lower speed limit.
half_angle integer no CMEAnalysis lower half-angle limit.
catalog string no DONKI catalog filter where supported.
keyword string no DONKI keyword filter where supported.
location string no IPS location filter where supported.
notification_type string no Notification filter such as all, FLR, SEP, CME, IPS, MPC, GST, RBE, or report.
nasa.nasa_get_epic_images 3 parameters
Schema command
kosmo integrations:schema nasa.nasa_get_epic_images --json
ParameterTypeRequiredDescription
collection string no EPIC collection: natural or enhanced. Defaults to natural.
date string no Optional date in YYYY-MM-DD format.
all_dates boolean no When true, return all available dates instead of image metadata.
nasa.nasa_get_earth_imagery 4 parameters
Schema command
kosmo integrations:schema nasa.nasa_get_earth_imagery --json
ParameterTypeRequiredDescription
lon number yes Longitude.
lat number yes Latitude.
date string no Optional date in YYYY-MM-DD format.
dim number no Optional image width and height in degrees.
nasa.nasa_get_earth_assets 4 parameters
Schema command
kosmo integrations:schema nasa.nasa_get_earth_assets --json
ParameterTypeRequiredDescription
lon number yes Longitude.
lat number yes Latitude.
date string no Optional date in YYYY-MM-DD format.
dim number no Optional image width and height in degrees.
nasa.nasa_search_images 8 parameters
Schema command
kosmo integrations:schema nasa.nasa_search_images --json
ParameterTypeRequiredDescription
q string yes The search query (e.g., "moon landing", "Mars", "black hole", "Saturn rings").
media_type string no Filter by media type: "image", "video", or "audio". Defaults to all types.
page integer no Page number for pagination (default 1).
year_start string no Optional starting year for media creation date filtering.
year_end string no Optional ending year for media creation date filtering.
center string no Optional NASA center filter such as JPL, KSC, or GSFC.
keywords string no Optional comma-separated keyword filter.
nasa_id string no Optional exact NASA media ID filter.
nasa.nasa_get_image_asset 1 parameters
Schema command
kosmo integrations:schema nasa.nasa_get_image_asset --json
ParameterTypeRequiredDescription
nasa_id string yes NASA media ID returned by nasa_search_images.
nasa.nasa_get_image_metadata 1 parameters
Schema command
kosmo integrations:schema nasa.nasa_get_image_metadata --json
ParameterTypeRequiredDescription
nasa_id string yes NASA media ID returned by nasa_search_images.
nasa.nasa_get_image_captions 1 parameters
Schema command
kosmo integrations:schema nasa.nasa_get_image_captions --json
ParameterTypeRequiredDescription
nasa_id string yes NASA media ID returned by nasa_search_images.
nasa.nasa_get_eonet_events 7 parameters
Schema command
kosmo integrations:schema nasa.nasa_get_eonet_events --json
ParameterTypeRequiredDescription
status string no Event status such as open, closed, or all.
category string no Category ID or comma-separated category IDs.
source string no Source ID or comma-separated source IDs.
limit integer no Maximum number of events to return.
days integer no Only return events from the last number of days.
start string no Start date in YYYY-MM-DD format.
end string no End date in YYYY-MM-DD format.
nasa.nasa_get_eonet_event 1 parameters
Schema command
kosmo integrations:schema nasa.nasa_get_eonet_event --json
ParameterTypeRequiredDescription
id string yes EONET event ID.
nasa.nasa_get_eonet_categories 0 parameters
Schema command
kosmo integrations:schema nasa.nasa_get_eonet_categories --json
ParameterTypeRequiredDescription
No parameters.
nasa.nasa_get_eonet_sources 0 parameters
Schema command
kosmo integrations:schema nasa.nasa_get_eonet_sources --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.