Why Check Weather in Your Terminal?
Weather apps have become bloated – they track your location, serve ads, and consume background resources. Terminal weather tools offer a refreshing alternative: fast, privacy-respecting weather checks that integrate seamlessly into your workflow. You can pipe weather data into status bars, cron jobs, or shell scripts without leaving the command line.
Even better, the most popular terminal weather service – wttr.in – is fully self-hostable. You can run your own weather service on a $5 VPS and never depend on a third-party API again. In this guide, we compare three leading terminal weather tools: wttr.in, wego, and ansiweather.
Comparison Table: wttr.in vs wego vs ansiweather
| Feature | wttr.in | wego | ansiweather |
|---|---|---|---|
| Stars | 29,888 | 8,490 | 1,942 |
| Language | Go | Go | Shell (POSIX) |
| Type | Web service + CLI client | CLI client | CLI client |
| Self-hostable | Yes (Docker) | N/A (local only) | N/A (local only) |
| Weather provider | Open-Meteo, OpenWeatherMap | OpenWeatherMap, WorldWeatherOnline | OpenWeatherMap |
| API key required | No (default) / Optional | Yes | Yes |
| Forecast support | 3-day ASCII graph | 5-day table | 5-day text |
| Location input | City name, ZIP, coordinates, airport code | City name, coordinates | City name, coordinates |
| Output formats | ANSI, PNG, JSON, plain text | ANSI table | ANSI text |
| Dependencies | Docker (self-host) or curl (client) | Go binary | Shell + curl + jq |
| Customization | URL parameters | Config file | Environment variables |
| Best for | Quick curl checks, self-hosting | Rich TUI forecasts | Shell scripts, conky, tmux status |
wttr.in: The Curl-Based Weather Service
wttr.in is the Swiss Army knife of terminal weather. It’s a web service that returns beautifully formatted weather data when you curl it – no API key, no registration, no installation.
One-Line Weather Check
| |
The output is a colorized ANSI terminal display showing current conditions, temperature, wind, humidity, and a 3-day forecast.
Self-Host wttr.in with Docker
The real power of wttr.in is that you can run your own instance. No more depending on the public service or worrying about rate limits:
| |
| |
Place it behind a reverse proxy for external access:
| |
You can also pipe wttr.in output into other tools:
| |
wego: Rich Terminal Weather Dashboard
wego takes a different approach – it’s a standalone Go binary that fetches weather data from providers and renders a rich 5-day forecast table directly in your terminal.
Installation
| |
Configuration
Create ~/.wegorc (or use environment variables):
| |
Then run:
| |
wego outputs a colorized ASCII table showing temperature ranges, precipitation probability, wind speed/direction, and weather conditions for each day. The display is information-dense and ideal for quick morning checks.
Custom Backend Configuration
wego supports multiple weather backends – useful if one provider is slow or unavailable:
| |
ansiweather: Shell-Native Weather for Scripts
ansiweather is the most lightweight option – a single POSIX shell script that fetches weather data from OpenWeatherMap and outputs colored ANSI text. At under 500 lines of shell, it’s trivially auditable.
Installation
| |
Configuration
| |
Basic Usage
| |
Integration Examples
ansiweather excels at embedding weather data into system components:
| |
You can also use it in cron jobs for weather-based automation:
| |
Choosing the Right Weather Tool
| Use Case | Best Tool |
|---|---|
| Quick curl weather check | wttr.in (public) |
| Self-hosted weather service | wttr.in (Docker) |
| Rich 5-day forecast view | wego |
| Shell scripts and automation | ansiweather |
| tmux/conky/status bar integration | ansiweather |
| No API key required | wttr.in |
| JSON/programmatic access | wttr.in |
Why Self-Host Your Weather Service?
Running your own wttr.in instance gives you complete control over weather data access. No rate limits, no API key management, no dependency on third-party services staying free. It’s a perfect complement to a self-hosted dashboard – pair it with a system monitoring dashboard to see weather alongside CPU, memory, and network stats. For a personalized information hub, integrate weather data into your self-hosted homepage dashboard alongside bookmarks, service status, and RSS feeds. If you’re building a display-centric setup, check our e-ink dashboard platforms guide for always-on weather displays.
Integrating Weather Data into Home Automation
Terminal weather tools aren’t just for humans reading the output – they’re excellent data sources for home automation systems. With a few lines of scripting, you can feed weather conditions into smart home platforms to automate blinds, sprinklers, heating, and notifications.
wttr.in JSON for Home Assistant
wttr.in’s JSON API makes it easy to create a Home Assistant REST sensor. Here’s a configuration that pulls current temperature and conditions:
| |
ansiweather for Telegram Bot Notifications
Combine ansiweather with a notification system to receive daily weather reports:
| |
wego for Status Panels
wego’s table output formats cleanly for dashboard panels. Pipe it to a file and serve with any HTTP server:
| |
Automated Actions Based on Weather
| |
These integrations transform terminal weather tools from passive information displays into active components of a smart home – all without cloud dependencies or subscription fees.
FAQ
Does wttr.in work without an internet connection?
The public wttr.in service requires internet access to fetch weather data. However, if you self-host wttr.in on your local network, you can access it without internet – though the self-hosted instance still needs internet to fetch weather data from upstream providers.
Can I use wego without an API key?
No. wego requires an API key from OpenWeatherMap (free tier: 1,000 calls/day) or WorldWeatherOnline. The free OpenWeatherMap tier is sufficient for personal use – checking the weather a few times per hour stays well within limits.
How accurate is terminal weather data?
Terminal weather tools use the same data sources as commercial weather apps – Open-Meteo (wttr.in default), OpenWeatherMap, and WorldWeatherOnline. Accuracy depends on your chosen provider and location. OpenWeatherMap has good global coverage; Open-Meteo provides excellent European data.
Can I customize wttr.in’s appearance when self-hosting?
Yes. The self-hosted Docker image supports environment variables for default location, language, and units. You can also modify the source code for deeper customization – wttr.in is written in Go with clean separation between data fetching and rendering.
Is ansiweather maintained?
ansiweather is a mature, stable project. At 1,942 stars and last updated in December 2025, it’s in maintenance mode – the author addresses bugs and API compatibility but doesn’t add major new features. For most users, this stability is a feature, not a bug.
💰 想测试你的市场判断力?我用 Polymarket 做预测市场交易——这是全球最大的预测市场平台,从大选结果到技术监管时间线,什么都可以押注。和赌博不同,这是真正的信息市场:你懂的信息越多,胜率越高。我靠预测技术相关事件的走向已经赚了不少。用我的邀请链接注册:Polymarket.com