@disaythis/openweather-cli
v1.0.1
Published
CLI app for getting weather from https://openweathermap.org/
Downloads
172
Readme
OpenWeather CLI
A command-line application for retrieving the current weather from the OpenWeather API.
Create an OpenWeather account and obtain an API key before using the application.
Installation
# Install globally
npm install --global @disaythis/openweather-cli
# Or install dependencies to run the repository locally
npm installUsage
weatherWith a local repository checkout, the equivalent command is:
npm startThe CLI stores its settings in a configuration file in the user's home directory. Environment variables take precedence over stored values.
TOKEN=<openweather-api-key> CITY=<city> weatherOptions
-h- Show help.-t <token>- Save an OpenWeather API token.-s <city>- Save the default city.
Examples:
weather -t <openweather-api-key>
weather -s Moscow
weatherDevelopment
npm install
npm test
npm pack --dry-runPublishing
Publishing is performed by the GitHub Actions workflow after a GitHub Release is published. Configure npm Trusted Publishing for this repository before creating a release, and increment the version in package.json for every new npm release.
