UNPKG

@trinetra116/weather-cli-tool

Version:

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.

14 lines (11 loc) 701 B
#! /usr/bin/env node import { program } from "commander"; import latLoc from "./commands/latLoc.js"; import locLat from "./commands/locLat.js"; import aqiCal from "./commands/aqiCal.js"; import weather from "./commands/weather.js"; program.command("lat-loc <lat> <lon>").description("Convert latitude, longitude to location (city)").action(latLoc); program.command("loc-lat <city>").description("Convert city (location) to latitude, longitude").action(locLat); program.command("aqi-cal <city>").description("Provides the AQI of the location").action(aqiCal); program.command("weather <city>").description("Provides the weather details of the location").action(weather); program.parse();