Weather CLI is a command-line interface application that fetches real-time weather data for a specified city using the OpenWeatherMap API.
- Real-time Weather Data: Get the latest temperature, humidity, and weather description.
- User-Friendly CLI: Intuitive interface for a seamless experience.
- Metric Units: Display temperature in Celsius and humidity in percentage.
- Node.js installed
- OpenWeatherMap API Key (Get API Key)
-
Clone the repository:
git clone https://github.com/Engr-Jalal-Saleem/PIAIC-Quarter-1.git cd PIAIC-Quarter-1/Node%20Projects%20Quarter%201
-
Install dependencies:
bashCopy codenpm install
-
Run the application:
bashCopy code
node dist/weatherCli.js
- Enter the city when prompted and press Enter.
- View the current weather information for the specified city.
- Replace
'YOUR_OPENWEATHERMAP_API_KEY'
insrc/weatherCli.ts
with your actual OpenWeatherMap API key.
bashCopy codeWeather in New York: Temperature: 25°C Humidity: 60% Description: Clear sky
- If you encounter issues, refer to the OpenWeatherMap FAQ.
- Ensure your OpenWeatherMap API key is valid and correctly configured in the source code.
Contributions are welcome! Open issues or submit pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenWeatherMap for the weather data API.