Skip to content

maciakl/weather

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌤 weather

Show weather forecast on the command line.

This tool queries the National Weather Service to get current forecast for your current location.

⚠ Note: internet connection required.

By default, your location is determined by based on ip address geolocation via ip-api.com and then passed to weather service API to get your forecasting area.

Note that using a VPN may skew the results.

You can override this behavior, by using the -zip switch and providing a US zip code to see a forecast for that specific location. In that case, your geographical location will be determined via Zipppopotam.us API instead.

You can use the -location switch to check what location of forecast. Please note that the -location displays your forecast area returned by the National Weather Service API based on your latitude and longtitude. The forcast areas are sometimes larger than a zip codes, so you may not always see your exact town name displayed -- this is normal.

Usage

Usage:
  -version
        display version number and exit
  -location
        show the location of the forecast
  -week
        show the forecast for the entire week
  -zip <zip code>
        show the forecast a specific zip code

Example:

weather -week -zip 12345 -location

Look and Feel

Sample output:

screenshot2

Weekly forecast for specific location:

screenshot

Installing

There are few different ways:

Platform Independent

Install via go:

go install github.com/maciakl/weather@latest

Linux

On Linux (requires wget & unzip, installs to /usr/local/bin):

p="weather" && wget -qN "https://github.com/maciakl/${p}/releases/latest/download/${p}_lin.zip" && unzip -oq ${p}_lin.zip && rm -f ${p}_lin.zip && chmod +x ${p} && sudo mv ${p} /usr/local/bin

To uninstall, simply delete it:

rm -f /usr/local/bin/jjmp

Windows

On Windows, this tool is distributed via scoop (see scoop.sh).

First, you need to add my bucket:

scoop bucket add maciak https://github.com/maciakl/bucket
scoop update

Next simply run:

scoop install weather

If you don't want to use scoop you can simply download the executable from the release page and extract it somewhere in your path.

About

Show weather forecast on the command line

Resources

Stars

Watchers

Forks

Languages