https://github.com/ddanielsantos/weather-cli
Simple CLI made with Go, it interacts with the OpenWeather API
https://github.com/ddanielsantos/weather-cli
go
Last synced: 3 months ago
JSON representation
Simple CLI made with Go, it interacts with the OpenWeather API
- Host: GitHub
- URL: https://github.com/ddanielsantos/weather-cli
- Owner: ddanielsantos
- Created: 2022-05-29T01:04:00.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-22T19:54:48.000Z (over 2 years ago)
- Last Synced: 2025-01-31T20:11:17.053Z (3 months ago)
- Topics: go
- Language: Go
- Homepage:
- Size: 4.74 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# :cloud: Weather CLI
Simple CLI made with Go, it interacts with the OpenWeather's [Current API](https://openweathermap.org/current)
## :arrow_forward: Demo:
![]()
## :gear: Running locally:
- Download
```bash
git clone https://github.com/ddanielsantos/weather-cli
cd weather-cli
```
- Setup your OpenWeather API KeyYou can get more information about the API Key [here](https://openweathermap.org/appid), after you get one, you can use ``.env.example`` as a model to finish the configuration
- Run
```bash
go build .
./weather-cli now --city
```## :pencil: TODO:
- [ ] implement commands:
- [X] now
- [ ] forecast (using OpenWeather's [Forecast16 API](https://openweathermap.org/forecast16))## :thinking: Knowledge obtained:
- Get requests with ``net/http``
- Environment variable management
- Marshall, Unmarshall and Indent with ``encoding/json``
- ``cobra-cli`` basic usage