Weather Station is a command-line application written in Rust that provides real-time weather information for any city in the world. It uses the OpenWeatherMap API to fetch weather data and displays it in a user-friendly format with colored output.
- Retrieve current weather conditions like temperature, humidity, pressure, and wind speed.
- Beautifully formatted and colored text output for an enhanced terminal experience.
- Support for emojis to visualize temperature ranges.
- Loop-based user interaction to search for weather in multiple cities without restarting the app.
- Rust: Make sure you have Rust installed on your system. If not, you can install it from rust-lang.org.
- Cargo: Cargo is the Rust package manager, which is included with the Rust installation.
- OpenWeatherMap API Key: Sign up on OpenWeatherMap to get a free API key.
-
Clone the repository:
git clone https://github.com/pratikfandade/weather-cli.git cd weather-station
-
Add add the
OPENWEATHERMAP_API_KEY
in the file named.env
to your project root:cat .env.example | sed 's/OPENWEATHERMAP_API_KEY=changeme/OPENWEATHERMAP_API_KEY=YOUR_API_KEY/g' > .env
-
Run the program:
cargo run
If you have any suggestions or find any bugs, please open an issue. I'll be happy to help!