# Distributor CLI ## Shortest useful command ```sh go run ./cmd/distributor run --config examples/local-publish.yml ``` This discovers the example source bundle and publishes source files to `workspace/published/source-bundle`. ## Command overview ```sh distributor [--help] distributor version [--format text|json] distributor run [--config ] [--dry-run] [--force] [--format text|json] distributor validate [--format text|json] distributor validate --config --pipeline [--bundle ] [--format text|json] distributor inspect [--format text|json] distributor inspect --config --pipeline [--bundle ] [--format text|json] distributor manifest create --id [options] ``` - `version`: prints the application name and version. Development builds print `distributor dev`. - `run`: loads a YAML config, discovers source bundles, plans each configured destination, writes selected outputs unless `--dry-run` is set, and prints a final status summary. - `validate`: validates a local source bundle directory, a local source bundle tree, or one configured pipeline source. - `inspect`: validates source bundles and prints normalized bundle metadata for a local path or one configured pipeline source. - `manifest create`: creates `manifest.json` for a local source bundle directory. `validate` and `inspect` have two mutually exclusive modes: a local path shortcut, or configured source mode with `--config --pipeline `. Configured source mode opens only the selected pipeline source and supports configured `local`, `ssh`, and `s3` sources. It does not open destinations. `run` executes configured sources and destinations. ## Flag reference Root command: - `--help`, `-h`, or `help`: print root help. All subcommands: - `--help`, `-h`: print command-specific help. Output-producing subcommands: - `--format text|json`: output format. `text` is the default. Help and usage output are always text. `run` flags: - `--config `: config file to load. If omitted, `run` uses `/usr/local/etc/distributor/config.yml`. - `--dry-run`: load config, discover bundles, inspect destination state, print planned actions and final status, and do not write output files, destination state, or SSH `known_hosts` entries. - `--force`: allow explicit destructive replacement for supported conflict cases in this run only. `validate` and `inspect` configured source flags: - `--config `: config file to load for source validation or inspection. Required in configured source mode. - `--pipeline `: pipeline source to validate or inspect. Required in configured source mode. - `--bundle `: source-root-relative bundle directory to validate or inspect instead of discovering every bundle under the source root. `manifest create` flags: - `--id `: source bundle id. Required. - `--file `: bundle-relative file to include. Repeatable. If omitted, files are scanned recursively. - `--created