From 8b1e5abf6870493e6daa4d2f6a932cb9ca63e255 Mon Sep 17 00:00:00 2001 From: Eric Rakestraw Date: Mon, 1 Jun 2026 21:02:34 +0000 Subject: [PATCH] Add manifest creation command --- docs/cli.md | 28 ++++- docs/operations.md | 9 ++ internal/app/manifest.go | 128 +++++++++++++++++++++ internal/cli/manifest.go | 139 +++++++++++++++++++++++ internal/cli/root.go | 3 + internal/cli/root_test.go | 232 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 538 insertions(+), 1 deletion(-) create mode 100644 internal/app/manifest.go create mode 100644 internal/cli/manifest.go diff --git a/docs/cli.md b/docs/cli.md index 9311881..fe48ec2 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -16,12 +16,14 @@ distributor version [--format text|json] distributor run [--config ] [--dry-run] [--force] [--format text|json] distributor validate [--format text|json] distributor inspect [--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 or a local tree containing source bundles. - `inspect`: validates local source bundles and prints normalized bundle metadata. +- `manifest create`: creates `manifest.json` for a local source bundle directory. `validate` and `inspect` accept local paths only. `run` executes `local`, `ssh`, and `s3` backends. @@ -45,6 +47,13 @@ Output-producing subcommands: - `--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. +`manifest create` flags: + +- `--id `: source bundle id. Required. +- `--file `: bundle-relative file to include. Repeatable. If omitted, files are scanned recursively. +- `--created