A pure C CLI tool to fetch and display the NASA Astronomy Picture of the Day.
Apogee is a designed to be lightweight and fast.
It fetches the daily JSON payload from NASA's API, download the target image, decode it entirely in memory, and translate the pixels into true-color ANSI half-blocks.
- Terminal-native rendering: Uses 24-bit RGB ANSI escape codes and
▀(half-block) characters for high-resolution terminal output - Dynamic scaling: Automatically detects your terminal window size via
ioctland scales the image to fit perfectly without breaking your scrollback - Minimal dependencies: Written in pure C using
libcurlfor network requests,cJSONfor parsing, and thestb_imageheader for decoding - API safety: Includes robust error handling (and explicit parsing for NASA's
OVER_RATE_LIMITthrottle restrictions)
You only need a standard C build environement and libcurl installed.
gccorclangmakelibcurldevelopment headers (e.g.,sudo apt install libcurl4-openssl-devon Debian based distro,sudo pacman -S curlon Arch based distro orbrew install curl)
Clone the repository and compile using the included Makefile:
git clone https://github.com/wirenux/apogee.git
cd apogee
makeYou will need a free API key from NASA's API Portal.
Once you have it you can run to tool by passing the key as an environment variable.
export NASA_API_KEY="your_nasa_key"
make runOr directly via the binary:
NASA_API_KEY="your_nasa_api_key" ./build/apogeeIf you just want to test the tool without an API key, you can bypass authentication using the shared NASA demo key.
(Note: The demo key is heavily rate-limited globally, so if it don't work just try with your own API key ;-) )
make run ARGS="--demo"Or directly via the binary:
./build/apogee --demoIn this project the AI was used for:
- README Structure / Skeleton
- Mind Mapping
