https://github.com/tankengine-ish/cli_weather_tool
CLI Tool to Display the Weather [personal project]
https://github.com/tankengine-ish/cli_weather_tool
cli godotenv weather-api
Last synced: about 1 year ago
JSON representation
CLI Tool to Display the Weather [personal project]
- Host: GitHub
- URL: https://github.com/tankengine-ish/cli_weather_tool
- Owner: TankEngine-ish
- Created: 2024-03-30T18:00:08.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-02T11:26:03.000Z (about 2 years ago)
- Last Synced: 2024-04-02T23:29:07.816Z (about 2 years ago)
- Topics: cli, godotenv, weather-api
- Language: Go
- Homepage:
- Size: 50.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CLI_Weather_Tool
This is a simple command-line interface (CLI) application that fetches weather forecast data from the WeatherAPI.
The output shows the weather for the day up till the end of it.

# Prerequisites
Go programming language (version 1.16 or later).
An API key from WeatherAPI.
# Installation
Clone the repository and build the application: `go build -o `
# Usage
Before you can use the application, you need to set up your WeatherAPI key.
Create a .env file in the project root and add your API key:
`echo "WEATHER_API_KEY=your_api_key" > .env`
Replace your_api_key with your actual WeatherAPI key from here - https://www.weatherapi.com/
You can now run the application: ./name of the build
By default, the application will show the weather forecast for Varna, Bulgaria. You can specify a different location as a command-line argument:
./name of the build London

# Add to PATH
To use the weather command from any location on your system, you need to add it to your PATH.
## Linux/MacOS
Move the weather binary to /usr/local/bin.