A CLI application written in C# to see weather of a location. It uses two API services to fetch data from:
- OpenWeatherMap : One call API
- Mapbox : Geocoding API
OpenWeatherMap one call API requires latitude and longtitude to return a result. So, Mapbox geocoding API is used to forward geocode a location string to latitude and longitude.
To show results in the terminal using tables, fancy colors and to parse the command line arguments, Spectre.Console library was used.
This project is built using .NET5. So it is needed to properly run the application.
-
Create an
.env
file like the provided example.env.example
to add your own API tokens here. Otherwise program won't run. -
Clone the project
git clone https://github.com/rak810/cweather.git
-
Then cd into the project folder.
cd .\cweather\
-
Run build command
dotnet build
-
The project will compile now. And run the exe from bin.
cd .\bin\Debug\net5.0\ .\cweather.exe --help
The project isnt done yet completely. There are parts that need some more works. Things that are left to do:
- Add support for default location. A location that is saved. And if the location isn't specified in the commandline then results will be show for default location.
- Add support for adding token through CLI.
- Add some charts to visualize daily and hourly forecast.