wtw is a CLI tool to show the current weather on your terminal emulator using the OpenWeatherMap API.
You can download one of the binaries available on the releases page or install it using Go v1.12.9 or higher.
go get -u github.com/efreitasn/wtw
$(go env GOPATH)/bin/wtw
- OpenWeatherMap API key.
- OpenWeatherMap city ID of the location you want to get weather information about.
- Search for your city in this URL.
- Once you find your city in the search results, get the city ID from the address bar (the digits after
https://openweathermap.org/city/
).
First of all, you need to set your API key and your city ID. In order to do that, run the following command:
wtw set --city-id YOUR_CITY_ID --api-key YOUR_API_KEY
To get the current weather info, run
wtw
By default, wtw uses degrees Celsius, but it also supports Fahrenheit and Kelvin.
For instance, in order to use degrees Fahrenheit as the temperate unit, run
wtw set --unit F
The output string is the current temperature in the specified unit followed by a description of the current weather. For instance, a cloudy day would be something like
13.94°C - Clouds