GWeather is a command-line interface (CLI) written in Golang that provides weather forecasts using the WeatherAPI from RapidAPI.
-
Clone the repository:
git clone https://github.com/zoelabbb/Gweather.git
-
Navigate to the project directory:
cd Gweather
-
Create a
.env
file with your RapidAPI key and host:RAPID_API_KEY=your-rapidapi-key RAPID_API_HOST=weatherapi-com.p.rapidapi.com
Get your key and host from RapidAPI Here
-
Build the application:
go build -o Gweather
-
Move the executable to your path:
mv Gweather /usr/local/bin
-
Run the application:
Gweather {city}
Run the application with an optional city parameter to get the weather forecast. If no city is provided, it defaults to "Denpasar".
Gweather Denpasar
The percentage chance of rain can vary depending on the data source and specific geographic area. However, in general :
- Less than 40%: Low chance of rain. ( Green )
- Between 40% - 70%: Chance of rain. ( Yellow )
- Over 70%: High chance of rain. ( Red )
Configure the application by setting your RapidAPI key and host in the .env
file.
- Fork the repository (https://github.com/zoelabbb/Gweather/fork)
- Create a new branch (
git checkout -b feature-new
) - Commit your changes (
git commit -am 'Add new feature'
) - Push to the branch (
git push origin feature-new
) - Create a new Pull Request
For questions or suggestions, feel free to contact me: