Skip to content

Repository files navigation

Raindrop

Raindrop

A beautiful, feature-rich weather CLI for your terminal.
Sparklines, route planning, live dashboards, marine forecasts, measured stations, and more — core forecasts need no API key.

Python 3.12+19 CommandsOpen-MeteoMIT License2 Dependencies


raindrop current Seattle


Why Raindrop?

Most weather CLIs give you temperature and a condition. Raindrop gives you everything:

  • Sparkline graphs▁▂▃▅▇█▅▃ temperature and precipitation trends at a glance
  • Technical analysis — EMA crossovers, rate-of-change, and volatility on forecasts
  • Real driving routes — weather checkpoints along actual roads via OpenStreetMap
  • Full-screen dashboard — live TUI with auto-refresh
  • Astronomical data — moon phases, golden hour, blue hour, daylight tracking
  • Marine forecasts — wave height, swell, water temp for coastal trips
  • Zero-key core weather — forecasts, dashboards, routes, air quality, alerts, and astronomy use free/open APIs
  • Optional measured stations — nearby personal/official observations via Xweather when you configure a key

Installation

Requirements: Python 3.12+

# pip
pip install rdrop
# From source
git clone https://github.com/binarydoubling/raindrop.git
cd raindrop
pip install -e .

Quick Start

raindrop current Seattle # current conditions
raindrop window Seattle # sensory weather scene
raindrop stations nearby Fairbanks # nearby PWS observations (optional Xweather key)
raindrop hourly "New York" --spark --hours 12 # sparkline forecast
raindrop daily Portland # 10-day with trend analysis
raindrop dashboard Seattle --refresh 300 # live full-screen TUI
raindrop route "Seattle""San Francisco" -i 100 # road trip weather
raindrop aqi Beijing # air quality index
raindrop favorites add home "Seattle, WA"# save a location
raindrop current home # use it anywhere

Features

Weather Window

Translate weather variables into the feel of standing outside: air texture, sky, light, motion, surfaces, and distance.

raindrop window Seattle
raindrop outside Tokyo --compact

Current Weather

raindrop current Seattle

Measured Station Observations

Nearby personal weather station and official station observations through Xweather. These are measured station readings with station IDs, source classification, timestamps, QC/trust status, and freshness — separate from raindrop current, which remains Open-Meteo model/gridded current conditions.

raindrop stations nearby Fairbanks
raindrop stations nearby Fairbanks --kind pws
raindrop stations current PWS_SM9110

Xweather is optional and requires credentials. Human output includes the required attribution: Powered by Vaisala Xweather.

Hourly Forecast with Sparklines

raindrop hourly Seattle

10-Day Forecast with Technical Analysis

EMA crossovers, rate-of-change indicators, and trend detection applied to weather data.

raindrop daily Seattle

Route Weather Planning

Plan road trips with weather at every checkpoint along the actual driving route.

raindrop route Seattle San Francisco

Compare Multiple Locations

raindrop compare

Air Quality Index

raindrop aqi Seattle

Astronomical Data

Moon phases, golden hour, blue hour, and weekly daylight tracking.

raindrop astro Seattle

Marine Forecasts

raindrop marine San Diego

Clothing Recommendations

raindrop clothing Seattle

Live Dashboard

Full-screen TUI powered by Rich with automatic refresh.

raindrop dashboard Seattle --refresh 300

Commands

CommandDescriptionExample
window / outsideFirst-person weather sceneraindrop window Seattle
currentCurrent conditionsraindrop current Seattle
stationsMeasured station observationsraindrop stations nearby Fairbanks
hourlyHourly forecast (48h)raindrop hourly Seattle --spark
daily10-day forecast with trendsraindrop daily Seattle
dashboardFull-screen live TUIraindrop dashboard Seattle
routeWeather along a driving routeraindrop route "A" "B" -i 50
compareCompare multiple locationsraindrop compare NYC LA Chicago
alertsNWS weather alerts (US)raindrop alerts Seattle
aqiAir quality indexraindrop aqi Seattle
astroMoon phase, golden hourraindrop astro Seattle
marineOcean/wave forecastsraindrop marine "San Diego"
clothingWhat to wearraindrop clothing Seattle
historyCompare with past yearsraindrop history Seattle
discussionNWS forecast discussionraindrop discussion Seattle
precipPrecipitation totalsraindrop precip Seattle --days 7
fav / favoritesManage saved locationsraindrop favorites list
configView/edit settingsraindrop config show
completionsShell completionsraindrop completions bash

Global Options

--no-cache Bypass the API response cache for fresh data
--version Show the installed version
--help Show help for any command

Most data commands also support --json for scripting and -c/--country for ISO country filtering. Use raindrop config set units metric|imperial to switch unit presets.


Configuration

Settings live at $RAINDROP_CONFIG_DIR/config.json, $XDG_CONFIG_HOME/raindrop/config.json, or ~/.config/raindrop/config.json. API responses are cached under $RAINDROP_CACHE_DIR, $XDG_CACHE_HOME/raindrop, or ~/.cache/raindrop.

Optional Xweather credentials for raindrop stations can be supplied with XWEATHER_API_KEY or a mode-0600 JSON file at the same config directory, e.g. ~/.config/raindrop/xweather.json:

{"api_key":"<your combined Xweather API key>"}

Existing forecast/current commands remain keyless. raindrop config show only reports Xweather as configured/not configured and never prints the key.

raindrop config show # view current settings
raindrop config set units metric # switch to metric
raindrop config set location "NYC"# set default location
raindrop config cache # view cache stats
raindrop config cache --clear # clear cache
SettingValuesDefaultDescription
unitsimperial, metricimperialShortcut that updates the unit fields below
temperature_unitfahrenheit, celsiusfahrenheitTemperature display unit
wind_speed_unitmph, kmh, ms, knmphWind speed display unit
precipitation_unitmm, inchmmPrecipitation display unit
locationany stringnoneDefault location
country_codeISO 3166-1 alpha-2noneDefault country filter
modelauto or raindrop config models valueautoOpen-Meteo forecast model

Shell Completions

# Bash
raindrop completions bash >>~/.bashrc &&source~/.bashrc
# Zsh
raindrop completions zsh >>~/.zshrc &&source~/.zshrc
# Fish
raindrop completions fish >~/.config/fish/completions/raindrop.fish

How It Works

Raindrop combines several free/open APIs for core weather, with optional credentialed providers for measured observations:

APIPurpose
Open-MeteoForecasts, historical data, air quality, geocoding
OSRMReal driving routes via OpenStreetMap
NWSWeather alerts and forecast discussions (US)
XweatherOptional measured personal/official station observations

The entire project has only 2 runtime dependencies (Click and Rich). HTTP, caching, geocoding, credentials, and astronomical calculations are all handled with Python's standard library.

Technical Highlights

  • Weather window scene engine that infers air texture, sky, light, motion, surface, and horizon from combined variables
  • Measured station observations with provider/source identity, timestamps, QC/trust labels, freshness filtering, and safe credential-free cache keys
  • Sparklines via Unicode block characters (▁▂▃▄▅▆▇█)
  • EMA crossovers and rate-of-change analysis on temperature data
  • Pure-Python astronomy — moon phases, Julian day, daylight duration with no external libs
  • Haversine sampling along OSRM polylines for route weather checkpoints
  • File-based cache with SHA256 keys and endpoint-specific TTLs
  • 14 weather models selectable: ECMWF, GFS, HRRR, ICON, ARPEGE, AROME, UKMO, GEM, JMA, MetNo, and more

Regenerating Screenshots

The feature screenshots in this README are real CLI output captured as SVGs:

python scripts/capture.py # capture all commands
python scripts/capture.py current # capture a specific command

Contributing

git clone https://github.com/binarydoubling/raindrop.git
cd raindrop
uv sync
uv run pytest
uv run ruff check
uv run pyright

License

MIT


Built with coffee and curiosity in the Pacific Northwest — where checking the weather is a lifestyle.

About

Python CLI tool for weather data processing and analysis. Fetches, parses, and displays forecast data with clean terminal output.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages