Client for fetching weather data from OpenWeatherMap.org and a gRPC API
Find a file
2022-09-03 01:07:37 -04:00
cmd Update version info 2022-09-03 01:07:24 -04:00
info Add screenshot 2022-09-03 01:06:08 -04:00
SimplrWeather@da7e324500 Update submodule 2022-08-02 21:48:28 -04:00
.gitignore Update .gitignore 2022-08-03 00:22:02 -04:00
.gitmodules Added submodule 2022-07-26 23:02:38 -04:00
go.mod Bump go to v1.19 and update modules 2022-08-06 20:10:05 -04:00
go.sum Update modules 2022-08-09 01:13:55 -04:00
README.md Update README 2022-09-03 01:07:37 -04:00

weather-cli

Command line client for fetching weather data from the Open Weather API.

This small client uses the OpenWeather API to provide forecasts based on current location, zip code, exact coordinates, and city name. In addition, the client is capable of connecting to its partner project, SimplrWeather, which provides a gRPC backend for retrieving historical weather data.

Instructions

A file named .env must be placed in the root of the project or in the directory from which you will run the compiled binary. You must provide a port number and an OpenWeather API key in this file:

API_KEY=xxxxxxxxxxxxxxxx
PORT=xxxxx

Once complete, you can start the client by runnning go run cmd/*.go from the root of the project. Optionally, binary files can also be compiled with go build.

By default, the client will automatically obtain your approximate location using your IP address. Additional data based on IP address is fetched from ipinfo.io. If you don't want your IP address sent to that API, simply choose among the other options.

Basic options include:

  • Automatically obtain forecast for your location
  • Search by zip code
  • Search by city name

Advanced options:

  • Change units (default imperial)
  • Search with exact location (latitude and longitude)
  • Historical data

Screenshot

Main menu