Add configuration and CLI foundation
This commit is contained in:
32
docs/cli.md
32
docs/cli.md
@@ -1,23 +1,43 @@
|
||||
# Weatherreporter CLI
|
||||
|
||||
`weatherreporter` currently exposes only the root help command while the
|
||||
application skeleton is being established.
|
||||
`weatherreporter` currently resolves configuration and command requests, then
|
||||
returns a not-implemented error for report generation and scheduled runs.
|
||||
|
||||
## Shortest Useful Command
|
||||
|
||||
```sh
|
||||
weatherreporter --help
|
||||
weatherreporter generate daily --date 2026-05-29 --out ./daily.md
|
||||
```
|
||||
|
||||
The command parses flags, loads configuration, resolves the request, and then
|
||||
stops before weather data fetching or report rendering.
|
||||
|
||||
## Command Overview
|
||||
|
||||
```text
|
||||
weatherreporter --help
|
||||
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
|
||||
```
|
||||
|
||||
Shows the available command-line help without loading configuration or calling
|
||||
external services.
|
||||
`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.
|
||||
|
||||
Reference in New Issue
Block a user