weather-cli-tool
A Command Line Interface (CLI) tool for:
- Accessing weather data of a location
- Accessing AQI of a location
- Getting coordinates of a location and vice-versa.
Tech Stack:
- Node.js
- NPM packages:
(i) axios
(ii) chalk
(iii) commander
APIs used:
- Geocoding API
- Air Pollution API
- Weather API
Setup:
- Install Node.js on your computer
- Create a account on OpenWeather and go to the API keys section
- Copy the API KEY
- In your terminal, run:
npm i @trinetra116/weather-cli-tool
- In the file "node_modules/weather-cli-tool/api.js", and paste your API KEY like this:
const API_KEY="your API KEY";
- Now you can run your cli-tool using the command:
weather <sub-command..> <arguements...>
- For guidelines on how to use the tool, run:
weather --help