Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@trinetra116/weather-cli-tool

trinetra11010ISC1.0.2

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.

node, nodejs, weather, weatherapi, cli, terminal, javascript, js, npm, npm-package, climate, forecast, open-source, api, open-weather

readme

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
  5. In the file "node_modules/weather-cli-tool/api.js", and paste your API KEY like this:
    const API_KEY="your API KEY";
  6. Now you can run your cli-tool using the command:
    weather <sub-command..> <arguements...>
  7. For guidelines on how to use the tool, run:
    weather --help