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

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.0.1
File Size Uploaded
weathr-1.0.1.tar.gz 17.5 kB Details

Built distribution (wheel)

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

Total release size: 51.1 kB

Release files / weathr-1.0.1.tar.gz

Download URL weathr-1.0.1.tar.gz
Size 17.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1d8c98bbe30b47c0baf4091d9951ab01f7bb6f542873f698659e118add9ae8f2
BLAKE2b-256 checksum
How to use checksums
163e4bd901352e10486c74c75e57b670fd2d0ac0e5a3c5ccbdca3636aba29a1a
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.0.1-py3-none-any.whl

Download URL weathr-1.0.1-py3-none-any.whl
Size 33.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
06f85e51fed19e755da2be2853c36ad59ddafa552bd227358f09227275f8988e
BLAKE2b-256 checksum
How to use checksums
64d567a66b19415e1ae6058f5496133ac48f838d2ae09fa69bf6ad76aa49e6dc
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

1.1.0

2 release files

This release

1.0.1 This release

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