@trinetra116/weather-cli-tool

1.0.2 • Public • Published

weather-cli-tool

A Command Line Interface (CLI) tool for:

  1. Accessing weather data of a location
  2. Accessing AQI of a location
  3. Getting coordinates of a location and vice-versa.

Tech Stack:

  1. Node.js
  2. NPM packages: (i) axios (ii) chalk (iii) commander

APIs used:

  1. Geocoding API
  2. Air Pollution API
  3. Weather API

Setup:

  1. Install Node.js on your computer
  2. Create a account on OpenWeather and go to the API keys section
  3. Copy the API KEY
  4. In your terminal, run:
npm i @trinetra116/weather-cli-tool
  1. In the file "node_modules/weather-cli-tool/api.js", and paste your API KEY like this:
const API_KEY="your API KEY";
  1. Now you can run your cli-tool using the command:
weather <sub-command..> <arguements...>
  1. For guidelines on how to use the tool, run:
weather --help

Dependents (0)

Package Sidebar

Install

npm i @trinetra116/weather-cli-tool

Weekly Downloads

4

Version

1.0.2

License

ISC

Unpacked Size

6.86 kB

Total Files

8

Last publish

Collaborators

  • trinetra116