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
# 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) | ||
--json |
False |
Output result in JSON format. | |
--theme |
-t |
default |
Theme to use for rendering output. |
--verbose |
-v |
False |
Enable verbose debug logging. |
--version |
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
# 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
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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file weathr-1.0.0.tar.gz.
File metadata
- Download URL: weathr-1.0.0.tar.gz
- Upload date:
- Size: 17.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
716342cd02964b108845768c1500c10079f9cac3860c52b1a437e575b31debba
|
|
| MD5 |
f9ca9548054b65afefe91e6c681ec319
|
|
| BLAKE2b-256 |
afdcabf4c98d50bcfc9dcc0828dd1d38b6312c068719b7f8c6b7dce658f774ce
|
File details
Details for the file weathr-1.0.0-py3-none-any.whl.
File metadata
- Download URL: weathr-1.0.0-py3-none-any.whl
- Upload date:
- Size: 32.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21291001fcb3e06951a87454eae38b74df039b4894fa4f27fa5cc63b3a3afd69
|
|
| MD5 |
43f6ba6309fbc3409d366106f332c8cc
|
|
| BLAKE2b-256 |
3dc8f1704fa9feba4fde2464f7b6cf792b78c56eaa43b81c7ebb5c9372d0b4cc
|