Add config loading and dry-run validation

This commit is contained in:
2026-05-31 01:53:13 +00:00
parent 22d0424232
commit 29dbad2967
16 changed files with 928 additions and 17 deletions

View File

@@ -3,10 +3,10 @@
## Shortest useful command
```sh
go run ./cmd/distributor --help
go run ./cmd/distributor run --config examples/local-to-local.yml --dry-run
```
This prints the currently implemented command shell.
This loads and validates the example config, then prints the resolved pipeline summary without publishing files.
## Command overview
@@ -20,7 +20,9 @@ distributor inspect
`version` prints the application name and version. The default development version is `dev`; release builds may replace it at build time.
`run`, `validate`, and `inspect` are command placeholders. They intentionally fail with a clear `not implemented` error until the corresponding application behavior exists.
`run --config <path> --dry-run` loads and validates configuration, then prints a concise summary of configured pipelines and destinations. It does not discover bundles or publish files yet.
`run` without `--dry-run`, `validate`, and `inspect` intentionally fail with a clear `not implemented` error until the corresponding application behavior exists.
## Flag reference
@@ -28,6 +30,19 @@ The root command supports:
- `--help`, `-h`: print root help.
Each implemented subcommand supports:
Each subcommand supports:
- `--help`, `-h`: print command-specific help.
`run` supports:
- `--config <path>`: config file to load.
- `--dry-run`: validate config and print the resolved summary without publishing.
## Common workflows
Validate a config file without publishing:
```sh
go run ./cmd/distributor run --config examples/local-to-local.yml --dry-run
```