>
Linux

Weathr: Check the Weather From Your Terminal With ASCII Art Animations

Weathr: Check the Weather From Your Terminal With One Command

I live in a terminal. I live in the terminal the way some people live in their email inbox: it is the first thing I open in the morning and the last thing I close at night. I have been a terminal-first user for about a decade, and the moment a tool can be in the terminal instead of a browser tab, I move it there. My email, my calendar, my todo list, my notes, all in the terminal. The browser is for the things the terminal cannot do well.

Weather was, for years, the thing I had to leave the terminal for. I would type curl wttr.in and get an ASCII art weather report, which was fine, but ugly and not great for parsing. Then a friend told me about Weathr, a small Rust binary that fetches the forecast and prints it as a clean, colorized table, right in the terminal. I have been using it for four months, and I have not opened a weather website since.

What Weathr actually is

Weathr is a single Rust binary that you install with one command. The full source is about 2,000 lines of Rust, and the binary is statically linked (compiled to a self-contained file with no external dependencies), so there is nothing to install beyond the binary itself. You can grab it from Homebrew, from cargo, or by downloading a release binary from the GitHub releases page.

brew install weathr

That is the entire setup. Once it is installed, you type weathr and you get the weather. By default, it uses your IP address to figure out your location. You can override the location with a city name, a zip code, or a latitude and longitude pair.

weathr                    # auto-detect location
weathr "Brooklyn, NY"     # specific city
weathr 11201               # zip code
weathr 40.6782,-73.9442   # lat/lon

Output is a clean, colorized table with the current conditions, the next 12 hours, and the next 7 days. The colors are ANSI (a standard for terminal color codes that works in any modern terminal emulator), so the output looks good in any modern terminal (iTerm2, Alacritty, Kitty, the macOS Terminal, Windows Terminal, the GNOME Terminal, anything that supports colors).

What the output actually looks like

The default output has three sections. Current conditions come first: temperature, feels-like, humidity, wind, and a short text description (“partly cloudy”, “light rain”, “clear”). The next 12 hours follow, with the temperature, precipitation chance, and a small ASCII icon for the conditions. Finally, the next 7 days, with the high, the low, and the conditions.

The output is colorized based on the temperature: blue for cold, green for mild, yellow for warm, red for hot. The first time I saw the output, I thought it was a small thing, but it turns out to be useful at a glance. When the temperature column is mostly red, I know it is a hot week. When it is mostly blue, I know to bring a jacket. The visual cue is faster to read than the numbers.

Data sources are clear in the output. The data comes from the National Weather Service in the US, and from Open-Meteo (a free weather API) for everywhere else. Accuracy has been good in my testing, matching the local forecast within a degree or two. Weathr is honest about its data source in the output, with a small footer that says “Data: NWS” or “Data: Open-Meteo”, which is the right behavior.

How I use it day to day

The setup that worked for me is a small shell function in my .zshrc (the configuration file for the Zsh shell, my default terminal shell). I aliased weathr to w for quick access, and I added a flag to show me the next 24 hours instead of the next 12:

alias w="weathr --hours 24"

When I want to see the week ahead, I use the --week flag, which expands the table to show every hour for the next 7 days. This is the view I check on Sunday evenings when I am planning the week.

A few details earned the tool a permanent spot. Speed comes first. Weathr is fast. Cold start (the time from running the command to seeing the first character of output) is under 100 milliseconds on my M2 MacBook, and the full output renders in about 300 milliseconds. The data is cached for 15 minutes, so if I run the command twice in a row, the second run is instant. Other details include:

  • Offline mode uses the last known forecast if the network is down, with a “(cached)” tag
  • The cache is per-location, so a query for Brooklyn does not invalidate a query for Chicago
  • The output is stable across runs, so you can pipe it to a parser or diff it across days
  • The data refreshes on a 15-minute interval, so you are never looking at truly stale data

Offline mode is the second feature. If you have a saved location, Weathr will use the last known forecast if the network is down. The output shows a small “(cached)” tag in the footer, so you know the data is stale. This is the right behavior. Most weather tools fail silently when the network is down. Weathr fails loudly, in a useful way.

Integration with my tmux status bar rounds out the trio. tmux (a terminal multiplexer that lets you run multiple terminal sessions in one window) has a status line at the bottom of the screen that can show custom text. I have mine set to show the current temperature and conditions, refreshed every 10 minutes. The configuration looks like this:

set -g status-right "#(weathr --compact)"

Now the temperature is always visible at the bottom of my terminal, no matter what I am working on. It is a small touch, but it is the kind of thing that makes the terminal feel like a real dashboard.

The trade-offs and what I do not like

Weathr is good, but it is not perfect. International data is the first limitation. Weathr uses the National Weather Service, which is excellent for the US and not great for international locations. If you are in the US, the data is the same data the official weather apps use. If you are outside the US, the data comes from Open-Meteo, which is also good but not always as accurate as a national service.

Historical data is the second gap. Weathr is a forecast tool, not a climate tool. It does not show you what the weather was yesterday, last month, or last year. If you need historical data for a project (agriculture, research, insurance), look elsewhere. Weathr is for “what is the weather going to be”, not “what was the weather”.

Severe weather alerts are the third limitation. Weathr does not push notifications for severe weather, does not integrate with the operating system’s notification system, and does not warn you about incoming storms. The data is from official sources, so the alerts exist in the data, but the app does not surface them. If you live in a place with frequent severe weather, do not rely on Weathr as your primary weather tool.

Configuration is the final gap. Weathr has a config file (~/.config/weathr/config.toml) for setting a default location, the units (Fahrenheit or Celsius), and a few other preferences. The file is well-documented, but the tool does not have a setup wizard or a weathr init command. If you are not comfortable editing a TOML file (a simple text configuration format), the setup will feel manual.

When Weathr is the right tool

Weathr is the right tool for a terminal-first user who wants a fast, scriptable, no-fuss weather command. It is the right tool for a developer who wants the forecast in their tmux status bar or in a shell script. It is the right tool for a sysadmin who needs to check the weather at a remote data center.

It is the wrong tool for a casual user who does not live in the terminal. It is the wrong tool for someone who needs a polished weather app with radar maps and hourly graphs. It is the wrong tool for someone whose primary concern is severe weather alerts.

The honest summary is this: Weathr is a focused, well-built tool that does one thing well. If you are in the terminal every day, and you want a weather command that respects your time, Weathr is the right tool. If you are not, you will not get much out of it.

Filed under: #terminal #tools #ubuntu

Leave a comment