- Modern UI: Beautiful, styled terminal output with ASCII icons and colors using
lipgloss. - Theming: Choose between
vibrant,dark, andlightthemes. - Extended Forecasts: View a detailed 7-day outlook (
--forecast) or a 24-hour breakdown (--hourly). - Interactive Selection: Easily pick from multiple city results when names are ambiguous.
- Auto-Location: Automatically detect your current city using IP geolocation.
- Caching: Built-in 15-minute caching for near-instant repeat lookups.
- Multi-City Support: Query multiple cities in a single command.
- Exporting: Save weather reports to
JSON,CSV, orMarkdown. - Configuration CLI: Manage your preferences directly through the tool.
- Automation-Friendly: Unified
--rawJSON output for piping into tools likejq.
Make sure you have Go installed.
go build -o weather-Cli- Arch Linux: Available in the weather-cli AUR.
- Binaries: You can grab a binary from the Releases.
./weather-Cli get London./weather-Cli get London Tokyo "New York"./weather-Cli get Paris --hourly --forecast./weather-Cli get London --output markdown --output-file report.md./weather-Cli get "New York" --units imperial --theme dark./weather-Cli get London ╭───────────────────────────────╮ │ │ │ WEATHER REPORT │ │ │ │ 📍 Location: London, United Kingdom │ │ 🌐 Latitude: 51.50853 │ │ 🌐 Longitude: -0.12574 │ │ 🕒 Timezone: Europe/London │ │ 👥 Population: 8,961,989 │ │ │ │ CURRENT CONDITIONS │ │ │ │ \ _ / 🔥 Temp: 15.6°C │ │ - ( )--o 💨 Wind: 18.7 Km/h (250°) │ │ / (___) 🌈 Condition: Partly Cloudy │ │ 💧 Humidity: 53.0% │ │ 🔥 Feels Like: 14.3°C │ │ 🧭 Surface Pressure: 1015.10 hPa │ │ 🌊 Sealevel Pressure: 1017.80 hPa │ │ 🌞 UV Index: 6 │ │ │ ╰────────────────────────────────╯ ./weather-Cli get London -f ╭─────────────────────────────╮ │ │ │ WEATHER REPORT │ │ │ │ 📍 Location: London, United Kingdom │ │ 🌐 Latitude: 51.50853 │ │ 🌐 Longitude: -0.12574 │ │ 🕒 Timezone: Europe/London │ │ 👥 Population: 8,961,989 │ │ │ │ CURRENT CONDITIONS │ │ │ │ \ _ / 🔥 Temp: 15.6°C │ │ - ( )--o 💨 Wind: 18.7 Km/h (250°) │ │ / (___) 🌈 Condition: Partly Cloudy │ │ 💧 Humidity: 53.0% │ │ 🔥 Feels Like: 14.3°C │ │ 🧭 Surface Pressure: 1015.10 hPa │ │ 🌊 Sealevel Pressure: 1017.80 hPa │ │ 🌞 UV Index: 6 │ │ │ │ 7-DAY FORECAST │ │ │ │ 🗓️ Wed, May 20: 18.6/12.8°C Light Drizzle │ │ 🗓️ Thu, May 21: 22.8/12.3°C Overcast │ │ 🗓️ Fri, May 22: 26.6/16.9°C Overcast │ │ 🗓️ Sat, May 23: 26.9/19.6°C Overcast │ │ 🗓️ Sun, May 24: 31.3/18.9°C Clear Sky │ │ 🗓️ Mon, May 25: 29.0/20.9°C Clear Sky │ │ 🗓️ Tue, May 26: 20.6/13.1°C Clear Sky │ │ │ ╰──────────────────────────────╯
./weather-Cli get London --raw{
"location": {
"name": "London",
"country": "United Kingdom",
"latitude": 51.50853,
"longitude": -0.12574,
"timezone": "Europe/London",
"population": 8961989
},
"forecast": {
"current_weather": {
"temperature": 15.6,
"windspeed": 18.7,
"winddirection": 250,
"weathercode": 2
},
...
}
}You can manage your configuration using the config command:
# Set a default city
./weather-Cli config set default_city "Amsterdam"# Disable interactive selection
./weather-Cli config set interactive false# Set default units
./weather-Cli config set units imperialThe configuration is stored at $HOME/.weather-cli.yaml.
| Flag | Shorthand | Description |
|---|---|---|
--forecast | -f | Show 7-day extended forecast |
--hourly | -H | Show 24-hour detailed forecast |
--units | -u | Units to use (metric or imperial) |
--theme | -t | Theme to use (vibrant, dark, light) |
--output | -o | Export format (json, csv, markdown) |
--output-file | Path to save the exported data | |
--no-list | -l | Disable interactive city selection |
--no-cache | Disable local caching | |
--no-style | Disable styled terminal visuals | |
--raw | -r | Output valid, unified JSON |
--config | Path to a custom config file | |
--version | -v | Print version number |
- API used: Open-Meteo
- Built with: Cobra, Viper, Lipgloss, and Bubble Tea.
