Welcome to Weather-CLI, a simple command-line interface (CLI) tool built with Node.js to fetch weather information for a given city.
- Retrieve current weather data for a specific city.
- Display temperature, weather conditions, and visibility.
-
Clone this repository to your local machine:
git clone https://github.com/your-username/weather-cli.git
-
Navigate into the project directory:
cd weather-cli
-
Install dependencies:
npm install
To use Weather-CLI, follow these steps:
-
Open your terminal.
-
Navigate to the directory where you cloned the repository.
-
Run the following command:
node weather.js weather <city>
Replace
<city>
with the name of the city for which you want to fetch weather data.
node weather.js weather mashhad
Please note that Weather-CLI uses the OpenWeatherMap API. You'll need to sign up for an API key at OpenWeatherMap and replace api.key
in weather.js
with your own API key.