This project is a simple command-line interface (CLI) tool written in Rust that allows users to quickly fetch current weather data for any city. The application uses the OpenWeatherMap API to retrieve data such as temperature, feels-like temperature, and wind speed, displaying it clearly in the terminal. Users can query multiple cities in one session.
- Interactive CLI application
- Fetches real-time weather data
- Displays:
- Temperature (°C)
- Feels-like temperature (°C)
- Wind speed (km/h)
- Fast and easy to use
- Rust installed (https://www.rust-lang.org/)
- OpenWeatherMap API key (https://openweathermap.org/api)
git clone https://github.com/your-username/weather-cli.git
cd weather-cli
cargo build
Open the env.rs file and insert your API key:
pub const API_KEY: &str = "YOUR_API_KEY";
cargo run
Then follow the prompts in the terminal:
- "yes" → enter a city
- "no" → exit the program
Weather data:
Temperature: 21.3°C
Feels-like temperature: 19.8°C
Wind Speed: 10.5 km/h