history-weather-cli
v1.0.1
Published
CLI for getting weather
Readme
History Weather CLI
A simple Node.js command-line tool that shows the current weather for a saved city using the OpenWeatherMap API.
Features
- Get current weather for your default city
- Save your OpenWeatherMap API key
- Save your default city
- Display temperature, feels-like temperature, humidity, and wind speed
- Colored terminal output
Requirements
- Node.js 18+ (recommended)
- npm
- OpenWeatherMap API key: https://openweathermap.org/api
Installation
Install dependencies locally:
npm installOptional: install globally from npm after publishing:
npm install -g history-weather-cliUsage
Run from project folder:
npm startIf installed globally:
weatherCLI Options
-hshow help-t <API_KEY>save OpenWeatherMap API key-s <CITY>save default city
Examples
weather -t your_openweather_api_key
weather -s London
weatherHow It Works
- Save your API key with
-t. - Save your city with
-s. - Run
weatherwithout arguments to get current weather for the saved city.
Configuration Storage
The app stores your data in a JSON file in your home directory:
~/weather-data.json
On Windows, this is usually:
C:/Users/<YourUser>/weather-data.json
Stored keys:
token(OpenWeatherMap API key)city(default city)
License
ISC
