Every Open-Meteo endpoint family in one CLI — forecast, archive, marine, air quality, flood, climate, ensemble, seasonal, geocoding, elevation.
Comprehensive coverage of Open-Meteo's free, no-API-key tier across all 11 endpoint families. City-name input via integrated geocoding, WMO code humanization, and a local SQLite cache that powers commands no upstream tool can: forecast diff, climate-vs-now compare, activity verdicts, climate normals.
Authentication
No API key required. The free tier supports up to ~10,000 requests per day for non-commercial use. If you have an Open-Meteo customer-tier subscription, set OPEN_METEO_API_KEY in the environment and the CLI auto-routes to customer-*.open-meteo.com with the apikey appended — same commands, same flags, higher limits, commercial use allowed.
Quick Start
# Resolve a place name to coordinates (used by spec-derived commands).
# Novel commands (panel, compare, normals, weather-mix, forecast diff,
# accuracy, is-good-for) accept --place natively.
open-meteo-pp-cli geocode search --name Seattle --count 1 --json
# Current conditions for a city by name (panel takes --place natively).
open-meteo-pp-cli panel --place Seattle --current temperature_2m,weather_code --humanize
# 7-day daily forecast as JSON.
open-meteo-pp-cli forecast --latitude 47.6062 --longitude -122.3321 --daily temperature_2m_max,temperature_2m_min,precipitation_sum --forecast-days 7 --json
# Historical ERA5 data — works for any date back to 1940.
open-meteo-pp-cli archive --latitude 47.6062 --longitude -122.3321 --start-date 2024-01-01 --end-date 2024-01-31 --daily temperature_2m_max --json
# Climate-vs-now anomaly: how today compares to the 30-year normal (--place native).
open-meteo-pp-cli compare --place Seattle --metric temperature_2m_mean --years 30 --json
# Side-by-side multi-location panel in one batched call.
open-meteo-pp-cli panel --place Seattle,Berlin,Tokyo --current temperature_2m,weather_code --json
Unique Features
These capabilities aren't available in any other tool for this API.
Local state that compounds
-
forecast diff — See exactly what changed since the last forecast pull for this location — temperature deltas, new precipitation hours, weather-code shifts.
Pick this when an agent needs to react to forecast changes (alerting, replanning) rather than to the current forecast itself.
open-meteo-pp-cli forecast diff --place Seattle --json --select changes
-
normals — Compute the 30-year (or user-specified) climate normal for any (location, day-of-year, variable) tuple.
Use to ground a 'normal vs current' answer. Also useful for travel/timing recommendations across decades.
open-meteo-pp-cli normals --place Seattle --month 7 --variable temperature_2m_max --years 30 --json
-
accuracy — For any past date, compare what the model predicted (cached snapshot) against what actually happened (archive ground truth).
Use to score forecast trust over time, or to debug a 'why did the forecast change?' question.
open-meteo-pp-cli accuracy --place Seattle --date 2025-12-25 --variable temperature_2m_max --json
-
weather-mix — Distribution of WMO weather conditions (% clear, % rain, % storms, etc.) over an arbitrary historical window for a place.
Use for travel planning, climatology summaries, or 'how often does it rain in November?' questions.
open-meteo-pp-cli weather-mix --place Seattle --past-days 30 --json
Cross-API joins
-
compare — Compare today's weather (or any forecast hour) against the 30-year climate normal for that date and place.
Use when a user asks 'is this weather unusual?' or 'how does this compare to historical?' — a single API call cannot answer.
open-meteo-pp-cli compare --place Seattle --metric temperature_2m_mean --years 30 --json
-
is-good-for — Verdict (GO / CAUTION / STOP) for surfing, skiing, hiking, running, biking based on combined forecast + marine + air-quality thresholds.
Use when the user asks a decision question, not a data question. Saves the agent from synthesizing 3 endpoint calls into a verdict.
open-meteo-pp-cli is-good-for surfing --place "Half Moon Bay, CA" --json
Agent-native plumbing
-
panel — One-command snapshot panel for N locations side-by-side — batched in a single Open-Meteo call when possible.
Use to compare conditions across locations in one shot; cheaper and faster than N separate calls.
open-meteo-pp-cli panel --place Seattle,Berlin,Tokyo --current temperature_2m,wind_speed_10m,weather_code --json
Usage
Run open-meteo-pp-cli --help for the full command reference and flag list.
Commands
air-quality
Air quality and pollen: PM2.5, PM10, ozone, NO2, SO2, CO, dust, pollens, EU/US AQI, UV.
open-meteo-pp-cli air-quality get - Air quality forecast and historical: pollutants, AQI, pollen, UV.
archive
Historical weather data (ERA5 reanalysis, 1940 to ~5 days ago). Same variable surface as forecast.
open-meteo-pp-cli archive get - Historical hourly/daily weather observations from ERA5 (1940 to ~5 days ago).
climate
CMIP6 climate change projections (1950-2050) under SSP scenarios.
open-meteo-pp-cli climate get - Daily CMIP6 climate projections for any (lat, lon) under SSP scenarios. Models include EC_Earth3P_HR, CMCC_CM2_VHR4, MRI_AGCM3_2_S, MPI_ESM1_2_XR, FGOALS_f3_H, NICAM16_8S, HiRAM_SIT_HR.
elevation
Digital elevation model lookup. Supports up to 100 coordinates per call.
open-meteo-pp-cli elevation get - Lookup elevation in meters for one or more coordinate pairs (up to 100).
ensemble
Ensemble forecasts (all model members) for uncertainty quantification.
open-meteo-pp-cli ensemble get - Hourly ensemble forecasts; returns all ensemble members so you can quantify uncertainty.
flood
River discharge / flood forecasts (GloFAS).
open-meteo-pp-cli flood get - Daily river discharge forecasts and historicals from GloFAS.
forecast
Weather forecast (up to 16 days). Free, no API key, hourly + daily + current resolution. Default model is best-available; pass --models for specific models (gfs_seamless, ecmwf_ifs025, dwd_icon, jma_seamless, metno_seamless, gem_seamless, meteofrance_arpege_world).
open-meteo-pp-cli forecast get - 7-16 day weather forecast for one or more coordinates. Pass comma-separated latitude/longitude for batch fetch.
geocode
Geocoding: search locations by name/postcode, or look up a location by ID.
open-meteo-pp-cli geocode get - Look up a single location by its Open-Meteo geocoding ID.
open-meteo-pp-cli geocode search - Search locations worldwide by name ("Berlin", "Springfield, IL") or postcode.
marine
Marine weather: wave height, period, direction, swell components, sea-surface temperature.
open-meteo-pp-cli marine get - Marine forecast/historical: waves, swells, sea-surface temperature.
seasonal
Seasonal forecasts (up to 9 months) using NCEP CFSv2.
open-meteo-pp-cli seasonal get - 9-month seasonal forecast at six-hourly resolution. Default model is NCEP CFSv2.
Output Formats
# Human-readable table (default in terminal, JSON when piped)
open-meteo-pp-cli air-quality
# JSON for scripting and agents
open-meteo-pp-cli air-quality --json
# Filter to specific fields
open-meteo-pp-cli air-quality --json --select id,name,status
# Dry run — show the request without sending
open-meteo-pp-cli air-quality --dry-run
# Agent mode — JSON + compact + no prompts in one flag
open-meteo-pp-cli air-quality --agent
Agent Usage
This CLI is designed for AI agent consumption:
- Non-interactive - never prompts, every input is a flag
- Pipeable -
--json output to stdout, errors to stderr
- Filterable -
--select id,name returns only fields you need
- Previewable -
--dry-run shows the request without sending
- Read-only by default - this CLI does not create, update, delete, publish, send, or mutate remote resources
- Offline-friendly - sync/search commands can use the local SQLite store when available
- Agent-safe by default - no colors or formatting unless
--human-friendly is set
Exit codes: 0 success, 2 usage error, 3 not found, 5 API error, 7 rate limited, 10 config error.
Freshness
This CLI owns bounded freshness for registered store-backed read command paths. In --data-source auto mode, covered commands check the local SQLite store before serving results; stale or missing resources trigger a bounded refresh, and refresh failures fall back to the existing local data with a warning. --data-source local never refreshes, and --data-source live reads the API without mutating the local store.
Set OPEN_METEO_NO_AUTO_REFRESH=1 to disable the pre-read freshness hook while preserving the selected data source.
JSON outputs that use the generated provenance envelope include freshness metadata at meta.freshness. This metadata describes the freshness decision for the covered command path; it does not claim full historical backfill or API-specific enrichment.
Health Check
open-meteo-pp-cli doctor
Verifies configuration and connectivity to the API.
Configuration
Config file: ~/.config/open-meteo-pp-cli/config.toml
Troubleshooting
Not found errors (exit code 3)
- Check the resource ID is correct
- Run the
list command to see available items
API-specific
- 429 "Daily API request limit exceeded" — Free tier caps ~10k/day, 5k/hr, 600/min. Wait, or set OPEN_METEO_API_KEY for the customer tier.
- "reason":"Cannot initialize a Float from invalid Float value 'nan'" — Some variables are missing for some hours (e.g., night-time UV). Drop the variable or filter: --select hourly.time,hourly.temperature_2m
- Place name returns wrong location — Disambiguate with comma-separated context: --place "Springfield, IL, US". Or look up by ID: open-meteo-pp-cli geocode search Springfield --count 10
- Hourly arrays look misaligned — All hourly/daily arrays index-align with .time. Use --select hourly.time,hourly.temperature_2m to keep them paired in agent output.
Sources & Inspiration
This CLI was built by studying these projects and resources:
Generated by CLI Printing Press