https://github.com/evasquare/weather-cli
Minimalistic command-line weather program that works with OpenWeather API.
https://github.com/evasquare/weather-cli
cli-program openweathermap terminal-app weather-app
Last synced: about 2 months ago
JSON representation
Minimalistic command-line weather program that works with OpenWeather API.
- Host: GitHub
- URL: https://github.com/evasquare/weather-cli
- Owner: evasquare
- License: mit
- Created: 2024-02-20T22:00:11.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-19T06:43:08.000Z (7 months ago)
- Last Synced: 2025-03-25T09:03:02.121Z (2 months ago)
- Topics: cli-program, openweathermap, terminal-app, weather-app
- Language: Rust
- Homepage: https://crates.io/crates/weather-cli
- Size: 91.8 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# weather-cli
Minimalistic command-line weather program. It works with OpenWeather API.## Setup
You can install the crate with `cargo install` command.```bash
cargo install weather-cli
```Once installed, create an API key on [OpenWeather](https://openweathermap.org).
You need to register your key running the following command.```bash
weather-cli api-setup --key "EXAMPLE_KEY"
```## Commands
| command | description |
| ------------ | -------------------------------------- |
| check | Check weather information in your city |
| set-location | Search and set your city |
| setup-api | Setup the OpenWeather API Key |
| about | View information about the program |
| help | View the list of commands |## Use Examples
1. Search city
```
$ weather-cli set-location --query "Toronto"* City list:
1) Old Toronto, CA (lat: 43.6534817, lon: -79.3839347)
2) Toronto, CA (lat: 43.6534817, lon: -79.3839347)
3) Toronto, US (lat: 41.9048584, lon: -90.8640346)
4) Toronto, US (lat: 37.7989253, lon: -95.9491562)
5) Toronto, CA (lat: 46.4524682, lon: -63.3799629)
Please select your city.
2* Select your preferred unit.
* MORE INFO: https://openweathermap.org/weather-data
1) Standard
2) Metric
3) Imperial
2Toronto is now your city!
I'll use metric for you.
```2. Check weather
```
$ weather-cli checkToronto (CA)
11.34° / Mist (mist)
H: 13.06°, L: 9.89°- Wind Speed: 3.6 m/s,
- Humidity: 93 %,
- Pressure: 1014 hPa
- Sunset: 08:24 PM
(Sunrise: 06:03 AM)
```