Skip to main content

weather ⛅

CI python

uv ruff ty pytest

A fast, beautiful terminal weather client with multi-provider fallbacks, AQI metrics, and smart caching.

weather demo


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.

onboarding demo

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 -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

# 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:


License

This project is licensed under the MIT License.

Metadata

Release files for weathr 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for weathr 1.1.0
File Size Uploaded
weathr-1.1.0.tar.gz 17.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for weathr 1.1.0
File Interpreter ABI Platform
weathr-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 51.4 kB

Release files / weathr-1.1.0.tar.gz

Download URL weathr-1.1.0.tar.gz
Size 17.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5a41cc35e1d5cd83eff732f045ca3e765b9748f572a0deed22b61eaf51deaff4
BLAKE2b-256 checksum
How to use checksums
7b11287c89af62690ec98b94c7124ef13b58ff736b64fb20b5b01252fe7def17
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.1.0-py3-none-any.whl

Download URL weathr-1.1.0-py3-none-any.whl
Size 33.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e26dae8b907d69682afea7d77238615f3318e79f359fe552a15bddc25ab15d9
BLAKE2b-256 checksum
How to use checksums
8f599d2be0113944c8e410c2e3e379073c7a1f1b041c61e11a7de9db253aec75
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 history Release notifications | RSS feed

1.3.0

2 release files

1.2.0

2 release files

1.1.1

2 release files

This release

1.1.0 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page