wttr.in
The right way to check the weather from the terminal via curl
Description
wttr.in is a console-oriented weather forecast service that can be accessed directly via curl, httpie, or wget. It supports multiple output formats including ANSI-colored terminal output, HTML, PNG, and JSON. You can query weather by city name, airport code, IP address, domain name, or GPS coordinates, and it supports location names in any language. Features include current conditions, 3-day forecasts, moon phase information, and an experimental map view. It is both a hosted service at wttr.in and an open-source project you can self-host.
Install
curl wttr.inNo installation needed — just use curl. Self-hosting requires cloning the repo.AI Summary
Console-oriented weather service accessible via curl that displays rich weather forecasts with ANSI graphics in the terminal.
Capabilities
- + Display current weather conditions and 3-day forecasts
- + Query by city name, airport code, IP address, domain, or GPS coordinates
- + Support for location names in any language (Unicode)
- + Multiple output formats: ANSI terminal, HTML, PNG, JSON, Prometheus metrics
- + Show moon phase information
- + Narrow single-day or current-condition views with URL parameters
- + Metric and USCS unit support
- + Experimental regional weather map view (v3)
Use When
- → When you want a quick weather check from the terminal
- → When you need weather data in scripts or pipelines via JSON output
- → When you want a visually rich weather display without installing anything
Avoid When
- x When you need historical weather data
- x When you need highly granular or scientific meteorological data
- x When you have no internet connection
Usage Patterns
Check weather for a city
curl wttr.in/London Displays a 3-day weather forecast for London
Get weather in JSON format
curl wttr.in/Paris?format=j1 Returns weather data for Paris as JSON for scripting
One-line weather summary
curl 'wttr.in/Berlin?format=%C+%t' Shows just the weather condition and temperature
Check moon phase
curl wttr.in/moon Displays the current moon phase
Typical Pipelines
curl -s 'wttr.in/NYC?format=%t' | xargs -I {} notify-send 'Weather: {}'