Skip to content

Latest commit

 

History

26 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wttr-cli-rs

A lightweight command-line tool written in Rust to fetch weather information using wttr.in. This tool allows you to quickly retrieve weather data for specified locations in your preferred language, with simple CLI options.


Features

  • Fetch weather for multiple locations.
  • Option to specify the language of weather details.
  • Clean and fast asynchronous HTTP requests with reqwest.
  • Implements the wttr.in API for weather reports.

Installation

  1. Clone the repository:

    git clone https://github.com/R-udren/wttr-cli-rs.git
    cd wttr-cli-rs
  2. Build the project using Cargo:

    cargo build --release
  3. Run the compiled binary:

    ./target/release/wttr-cli

Usage

Fetch weather information from wttr.in

Usage: wttr-cli.exe [OPTIONS] [LOCATIONS]...

Arguments:
  [LOCATIONS]...  City/location names to get the weather for. [default: ]

Options:
  -l, --lang <LANG>  Specify the language (e.g., ru, fr, de). [default: en]
  -h, --help         Print help
  -V, --version      Print version

Examples

  1. Fetch the weather for New York (English):

    wttr-cli "New York"

    img.png

  2. Fetch the weather for Paris in French:

    wttr-cli "Paris" -l fr 

    img.png

  3. Fetch the weather for multiple locations:

    wttr-cli "Berlin" "Tokyo" "Delhi"

    img.png


Dependencies

This project uses the following Rust dependencies:

  • reqwest: Asynchronous HTTP client for making API requests.
  • clap: Command-line argument parsing.
  • tokio: Asynchronous runtime for running async tasks.

Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request if you'd like to contribute improvements or fixes to the project.


License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Rust weather client for wttr.in

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages