Files
weatherreporter/docs/cli.md

45 lines
1.6 KiB
Markdown

# Weatherreporter CLI
`weatherreporter` currently resolves configuration, command requests, report
definitions, and valid periods, then returns a not-implemented error for report
generation and scheduled runs.
## Shortest Useful Command
```sh
weatherreporter generate daily --date 2026-05-29 --out ./daily.md
```
The command parses flags, loads configuration, resolves report identity and the
valid period, and then stops before weather data fetching or report rendering.
## Command Overview
```text
weatherreporter generate daily
weatherreporter generate tomorrow
weatherreporter generate three-day
weatherreporter generate weekend
weatherreporter generate storm --start 2026-05-29T18:00 --end 2026-05-30T06:00
weatherreporter run morning
weatherreporter run evening
```
`generate` commands resolve one report request. `run` commands resolve a
scheduled batch request. All report and batch execution currently returns
`not implemented` after request resolution.
## Flags
- `-h`, `--help`: show help.
- `--config PATH`: load configuration from `PATH` instead of `/usr/local/etc/weatherreporter/config.yml`.
- `--units VALUE`: override configured Weather API units.
- `--tz NAME`: override configured Weather API timezone.
- `--out PATH`: override report output path or directory for `generate` commands.
- `--date YYYY-MM-DD`: optional date for `generate daily`; defaults to the current local date in the configured timezone.
- `--start TIME`: required start time for `generate storm`.
- `--end TIME`: required end time for `generate storm`.
Storm times accept `YYYY-MM-DDTHH:MM` in the configured timezone or RFC3339
timestamps with explicit offsets.