Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

NOTE: I'm aware of how broken weatherman is now. You can blame weatherbug for that. They did a major redesign of their site and began rendering elements with javascript making it impossible for curl to scrape the data. A major rewrite is planned, but it will likely be using an API instead scraping a web page. It will also have more dependencies as I'll likely be writing it in Perl. The new version may not include all of the information it was displaying as before, but at least it won't have to chase a moving target.


weatherman displays weather information from WeatherBug on the command line. It is written entirely in bash and will run on most UNIX/Linux systems.

The latest version of weatherman was released on January 12, 2013 with the following changes:

  • Using metric units with extended forecasts works once again
  • Better column alignment when metric units are specified
  • Fixed a rare case where extended forecasts would be displayed incorrectly
  • No longer display units with empty values
  • Removed the program name and project URL from the output


weatherman requires curl.

curl -o weatherman-1.2.2.tar.gz -L
tar -zxvf weatherman-1.2.2.tar.gz
cd weatherman-1.2.2
cp weatherman /usr/bin
chmod a+x /usr/bin/weatherman
cp weatherman.1.gz /usr/share/man/man1

If you are using OpenBSD, gunzip the manpage before copying it.


weatherman [options] LOCATION 


    weatherman "Tokyo, Japan"
    weatherman -e 77001

 -m          use metric units (Celcius, millibars, millimeters)
 -e          use English units (Fahrenheit, inches)
 -x          show extended forecast
 -F FORMAT   print output using specified format
 -S          set unit and location setting as defaults
 -h          display this help and exit
 -v          output version information and exit

Example output

$ weatherman "Tokyo, Japan"
Current Conditions for Tokyo, Japan
Reported by Tokyo (Haneda International Airport) @ Jan 13, 2013 12:00 PM

Temp: 10 C
Today: Mostly Sunny
Tonight: Rain

High: 10 C         Wind Speed: ESE 13    Rain: 0.00mm
Low: 1 C           Gust: ESE 11          Rain/Month: 0.00mm
Feels Like: 10 C   Avg Wind: ESE 13      Sunrise: 6:50 AM
Humidity: 47%      Pressure: 1019.98mb   Sunset: 4:48 PM
Dew Point: -1 C                          Moonphase: New

Data provided by

Customizing output

weatherman allows you to customize the output however you want with the -F option.

Each piece of data can be referenced with a sequence character. Escape sequences are also interpreted. This option isn't usable with extended forecasts.

For example, if you only wanted to display the current temperature for Tokyo, Japan, you would use the following command:

$ weatherman -F'%c %u' "Tokyo, Japan"

A more detailed example followed by the resulting output:

$ weatherman -F'The high and low temps for %l are %T %u and %t %u with a humidity of %h%%' "Tokyo, Japan"

The high and low temps for Tokyo, Japan are 17 C and 16 C with a humidity of 63%

See the manpage for a list of available sequence characters.

Something went wrong with that request. Please try again.