CLI Installation
CLI Installation
Section titled “CLI Installation”Install
Section titled “Install”go install github.com/peteretelej/nasa/cmd/nasa@latestVerify
Section titled “Verify”nasa --helpExpected output:
Usage: nasa <command> [flags]
Commands: apod Astronomy Picture of the Day neo Near-Earth Object Web Service donki Space Weather (DONKI) images NASA Image and Video Library ssd Small-Body Database (SSD/CNEOS) eonet Earth Observatory Natural Event Tracker
Flags: --version Print version and exit --help Show this help messageAPI Key
Section titled “API Key”Set your API key via environment variable:
export NASA_API_KEY="your-registered-key"The CLI also accepts NASAKEY as a fallback. Without either, it uses NASA’s DEMO_KEY (30 requests/hour).
Most commands also accept --api-key to override per-invocation:
nasa apod --api-key="your-key"Output Formats
Section titled “Output Formats”All commands default to formatted table output. Add --json for machine-readable JSON:
nasa apod --jsonnasa neo feed --json