@qodalis/cli-server-plugin-weather
v1.0.0-beta.5
Published
Weather information plugin for Qodalis CLI server — provides current weather and forecast commands
Maintainers
Readme
@qodalis/cli-server-plugin-weather
Weather information plugin for Qodalis CLI Server (Node.js). Provides current weather conditions and 3-day forecast commands using the wttr.in API.
Install
npm install @qodalis/cli-server-plugin-weatherQuick Start
import { createCliServer } from '@qodalis/cli-server-node';
import { WeatherModule } from '@qodalis/cli-server-plugin-weather';
const { app } = createCliServer({
configure: (builder) => {
builder.addModule(new WeatherModule());
},
});Commands
| Command | Description |
|---------|-------------|
| weather [location] | Show current weather conditions (defaults to London) |
| weather current [location] | Show current weather conditions |
| weather forecast [location] | Show a 3-day weather forecast |
Parameters
| Parameter | Alias | Type | Default | Description |
|-----------|-------|------|---------|-------------|
| --location | -l | string | London | City name to get weather for |
The location can also be passed as the command value (e.g. weather Paris).
Example Output
Weather for Paris, France
Condition: Partly cloudy
Temperature: 18°C (feels like 17°C)
Humidity: 65%
Wind: 15 km/h SW
Visibility: 10 km
Pressure: 1015 hPaLicense
MIT
