weather ⛅
A fast, beautiful terminal weather client with multi-provider fallbacks, AQI metrics, and smart caching.
Install
# With uv (recommended)
uv tool install weathr
# With pipx
pipx install weathr
First-Run Onboarding
On your first launch (or at any time by running weather setup), weather launches an interactive onboarding flow. It detects your location using IP geolocation, asks to confirm your preferred city, and lets you pick your default unit system.
Your preferences are saved locally (config.toml). After setup, simply running weather displays your local forecast instantly.
Usage
# Check current weather + 6-day forecast for your saved location
weather
# Check weather for any city, landmark, address or postal codes
weather -l Tokyo
weather -l "Berlin, Germany"
weather -l 94103
# Specify total days of forecast (1 to 16 days)
weather -d 3
weather -l London -d 10
# Override unit system
weather --metric # °C, km/h, mm
weather --imperial # °F, mph, in
# Bypass cache and fetch fresh data
weather --refresh
weather -l "Paris" -r
# Output JSON for scripting
weather --json
weather -l "Reykjavik" --json | jq .weather.current.temperature
# Verbose logging
weather -l "Berlin" -v
CLI Options & Subcommands
Options
| Flag | Short | Default | Description |
|---|---|---|---|
--location |
-l |
Saved location | City, landmark, address or postal codes. |
--days |
-d |
7 |
Total days of forecast, including today. (1-16) |
--metric |
Use metric units (°C, km/h, mm) | ||
--imperial |
Use imperial units (°F, mph, in) | ||
--refresh |
-r |
False |
Bypass cache and fetch fresh weather data. |
--json |
False |
Output result in JSON format. | |
--theme |
-t |
default |
Theme to use for rendering output. |
--verbose |
-v |
False |
Enable verbose debug logging. |
--version |
-V |
Show version and exit. |
Default File Paths
| OS | Config Path (weather config path) |
Cache Path (weather cache path) |
|---|---|---|
| Linux | ~/.config/weather/config.toml |
~/.cache/weather/cache.bin |
| macOS | ~/Library/Application Support/weather/config.toml |
~/Library/Caches/weather/cache.bin |
| Windows | %LOCALAPPDATA%\weather\config.toml |
%LOCALAPPDATA%\weather\Cache\cache.bin |
Cache Management
weather maintains a fast binary msgpack cache to eliminate redundant network calls:
# View cache file location
weather cache path
# View cache size, entries and status
weather cache stats
# Remove expired entries (>1 week old)
weather cache prune
# Wipe the cache entirely
weather cache clear
Configuration Management
# Run interactive setup at any time
weather setup
# Display config file path
weather config path
# View current configuration
weather config show
# Update configuration preferences
weather config set --location "Paris" --units imperial
# Reset configuration to defaults
weather config reset
Config file example (config.toml):
unit_system = "metric"
theme = "default"
[location]
latitude = 37.774929
longitude = -122.419416
display_name = "San Francisco, California, United States"
Optional: OpenWeather API Key
weather works out of the box with zero configuration using Open-Meteo. If you want OpenWeather as an automatic secondary fallback for Air Quality (AQI) data, obtain a free API key and set the OPENWEATHER_API_KEY environment variable:
Linux & macOS (Bash / Zsh)
echo 'export OPENWEATHER_API_KEY="your_api_key_here"' >> ~/.bashrc # or ~/.zshrc
source ~/.bashrc # or source ~/.zshrc
Windows (Powershell)
[System.Environment]::SetEnvironmentVariable('OPENWEATHER_API_KEY', 'your_api_key_here', 'User')
Attributions & Data Sources
This project is powered by several free and open data providers:
-
Weather Forecast:
- Open-Meteo (Weather Forecast API) under CC BY 4.0.
-
Air Quality:
- Open-Meteo (Air Quality API) under CC BY 4.0.
- OpenWeather (Air Pollution API).
-
Geocoding:
- Nominatim (Data © OpenStreetMap contributors).
- Open-Meteo (Geocoding API) under CC BY 4.0.
-
IP Geolocation:
License
This project is licensed under the MIT License.
Metadata
Release files for weathr 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| weathr-1.3.0.tar.gz | 18.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| weathr-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 54.6 kB
Release files / weathr-1.3.0.tar.gz
| Download URL | weathr-1.3.0.tar.gz |
|---|---|
| Size | 18.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
20f9aae529b7bec435367e3f4c0bcb8f815f9a89d33a185229eae338390e4133
|
|
BLAKE2b-256 checksum How to use checksums |
f3063ee47d19233dbff996548bb9325a0d8951bf93326c45263abe169a632816
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.4 {"installer":{"name":"uv","version":"0.12.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / weathr-1.3.0-py3-none-any.whl
| Download URL | weathr-1.3.0-py3-none-any.whl |
|---|---|
| Size | 35.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2bd36876b9ae7aaa0c5c48d184dcabf804e8ff9c0b7979d5cd14395d50ff8a27
|
|
BLAKE2b-256 checksum How to use checksums |
ce146b7f0cd7c317fdd9e84946c8a5a29d51efc1b62cedf660f40a2d35775330
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.4 {"installer":{"name":"uv","version":"0.12.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|