Skip to main content

weather ⛅

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

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


License

This project is licensed under the MIT License.

Metadata

Release files for weathr 1.2.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.2.0
File Size Uploaded
weathr-1.2.0.tar.gz 18.7 kB Details

Built distribution (wheel)

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

Total release size: 54.1 kB

Release files / weathr-1.2.0.tar.gz

Download URL weathr-1.2.0.tar.gz
Size 18.7 kB
Tags Source
SHA-256 checksum
How to use checksums
99b712ac961083ef83129d0d412708e1f96d95dd27124f8265bfc0d10800c242
BLAKE2b-256 checksum
How to use checksums
a6ed21441f4a80f812e5e8fc5ef27e169317bc66e6c7681dc4aad8c9f5d03e2b
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.2.0-py3-none-any.whl

Download URL weathr-1.2.0-py3-none-any.whl
Size 35.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7581cb138f210d2d25a0109487cfd16310d7ca096df4d86ab6c233a97b7d1886
BLAKE2b-256 checksum
How to use checksums
fa98f69cb9fe1169672ee55e3e67fd78bec62fdaefe33ca7c9d34e7e6c827a20
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

This release

1.2.0 This release

2 release files

1.1.1

2 release files

1.1.0

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