diff --git a/go.mod b/go.mod index 01b272b..7f305b4 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/verda-cloud/verda-cli -go 1.25.10 +go 1.25.11 require ( charm.land/lipgloss/v2 v2.0.2 diff --git a/internal/skills/files/verda-cloud.md b/internal/skills/files/verda-cloud.md index 41146e5..e94efdd 100644 --- a/internal/skills/files/verda-cloud.md +++ b/internal/skills/files/verda-cloud.md @@ -14,7 +14,7 @@ description: Use when the user mentions Verda Cloud, GPU/CPU VMs, cloud instance **Example:** `verda --agent instance-types --gpu -o json` **NEVER do these:** -- NEVER run `verda` without `--agent -o json` (except `verda ssh` and `verda s3 configure`, which are interactive — tell the user to run those) +- NEVER run `verda` without `--agent -o json` (except `verda ssh` and `verda object-storage configure`, which are interactive — tell the user to run those) - NEVER guess commands — consult the verda-reference skill or run `verda --help` - NEVER create resources without checking cost first - NEVER delete/shutdown without explicit user confirmation @@ -36,7 +36,7 @@ description: Use when the user mentions Verda Cloud, GPU/CPU VMs, cloud instance | **VM Info** | "my VMs", "instances", "what's running", "what's offline" | `verda --agent vm list -o json` (add `--status` to filter). Use `vm describe ` for a specific VM | | **Cost** | "balance", "burn rate", "spending", "how much" | `verda --agent cost balance -o json` and/or `cost running -o json` | | **Storage** | "volumes", "disks", "block storage" | `verda --agent volume list -o json` | -| **Object Storage** | "bucket", "S3", "object storage", "upload a file", "download a file" | `verda --agent s3 ls -o json` (needs `s3 configure` first — see below) | +| **Object Storage** | "bucket", "S3", "object storage", "upload a file", "download a file" | `verda --agent object-storage ls -o json` (needs `object-storage configure` first — see below) | ### Explore — Use Specific Commands, Not `status` @@ -78,24 +78,25 @@ Otherwise walk this chain. **ALWAYS** steps must run even if user specified valu ## Object Storage (S3) -S3-compatible object storage. **Separate credentials** from the main API — -keys are prefixed `verda_s3_` and set up by `verda s3 configure` (interactive, +S3-compatible object storage via the `object-storage` command (aliases `oss`, `d4`). +**Separate credentials** from the main API — +keys are prefixed `verda_s3_` and set up by `verda object-storage configure` (interactive, user-only — like `auth login`; never run it yourself, never handle the keys). -1. **Check setup first:** `verda s3 show` (prints text, not JSON). If it shows `s3_configured: false` (or `access_key_loaded: false`), tell the user to run `verda s3 configure` (do NOT run it). Configured ⇔ `access_key_loaded: true`. +1. **Check setup first:** `verda object-storage show` (prints text, not JSON). If it shows `s3_configured: false` (or `access_key_loaded: false`), tell the user to run `verda object-storage configure` (do NOT run it). Configured ⇔ `access_key_loaded: true`. 2. **Then operate** (all support `--agent -o json`): | Question / intent | Command | |-------------------|---------| -| List buckets | `verda --agent s3 ls -o json` | -| List a bucket's contents | `verda --agent s3 ls s3://bucket -o json` (add `--recursive`) | -| Upload a file | `verda --agent s3 cp ./file s3://bucket/key -o json` | -| Download a file | `verda --agent s3 cp s3://bucket/key ./file -o json` | -| Copy / move within S3 | `verda --agent s3 cp\|mv s3://b/a s3://b/c -o json` | -| Mirror a directory | `verda --agent s3 sync ./dir s3://bucket/prefix/ -o json` | -| Delete object(s) | `verda --agent s3 rm s3://bucket/key --yes -o json` | -| Make / remove a bucket | `verda --agent s3 mb\|rb s3://bucket -o json` (`rb` needs `--yes`) | -| Time-limited share URL | `verda --agent s3 presign s3://bucket/key -o json` | +| List buckets | `verda --agent object-storage ls -o json` | +| List a bucket's contents | `verda --agent object-storage ls s3://bucket -o json` (add `--recursive`) | +| Upload a file | `verda --agent object-storage cp ./file s3://bucket/key -o json` | +| Download a file | `verda --agent object-storage cp s3://bucket/key ./file -o json` | +| Copy / move within S3 | `verda --agent object-storage cp\|mv s3://b/a s3://b/c -o json` | +| Mirror a directory | `verda --agent object-storage sync ./dir s3://bucket/prefix/ -o json` | +| Delete object(s) | `verda --agent object-storage rm s3://bucket/key --yes -o json` | +| Make / remove a bucket | `verda --agent object-storage mb\|rb s3://bucket -o json` (`rb` needs `--yes`) | +| Time-limited share URL | `verda --agent object-storage presign s3://bucket/key -o json` | **Destructive (`rm`, `rb`):** require `--yes` in agent mode, else they return `CONFIRMATION_REQUIRED`. `cp`/`mv`/`sync` don't prompt — confirm intent with the diff --git a/internal/skills/files/verda-reference.md b/internal/skills/files/verda-reference.md index 59ddc8d..29a76eb 100644 --- a/internal/skills/files/verda-reference.md +++ b/internal/skills/files/verda-reference.md @@ -34,14 +34,14 @@ All commands: `--agent -o json` (except `verda ssh` and `verda auth show`). | "estimate", "how much will it cost" | `cost estimate` | | "connect", "SSH in", "remote access" | Tell user to run `verda ssh ` themselves (interactive) | | "login", "authenticate", "credentials" | `auth login` (user runs manually) | -| "bucket", "S3", "object storage", "list buckets" | `s3 ls` | -| "upload", "put file in bucket" | `s3 cp ./file s3://bucket/key` | -| "download", "get file from bucket" | `s3 cp s3://bucket/key ./file` | -| "sync", "mirror folder to/from bucket" | `s3 sync ` | -| "delete object", "remove from bucket" | `s3 rm s3://bucket/key --yes` | -| "make bucket", "create bucket" / "remove bucket" | `s3 mb` / `s3 rb --yes` | -| "share link", "presigned URL", "temporary link" | `s3 presign s3://bucket/key` | -| "set up S3", "configure object storage" | `s3 configure` (user runs manually — interactive) | +| "bucket", "S3", "object storage", "list buckets" | `object-storage ls` | +| "upload", "put file in bucket" | `object-storage cp ./file s3://bucket/key` | +| "download", "get file from bucket" | `object-storage cp s3://bucket/key ./file` | +| "sync", "mirror folder to/from bucket" | `object-storage sync ` | +| "delete object", "remove from bucket" | `object-storage rm s3://bucket/key --yes` | +| "make bucket", "create bucket" / "remove bucket" | `object-storage mb` / `object-storage rb --yes` | +| "share link", "presigned URL", "temporary link" | `object-storage presign s3://bucket/key` | +| "set up S3", "configure object storage" | `object-storage configure` (user runs manually — interactive) | ## Discovery @@ -141,21 +141,22 @@ Hostname patterns: `{random}` → random words, `{location}` → location code ## Object Storage (S3) +The `object-storage` command (aliases `oss`, `d4`) manages S3-compatible storage. Separate credentials from the main API (keys prefixed `verda_s3_`). Set up with -`verda s3 configure` (interactive — user runs it). Check status first: +`verda object-storage configure` (interactive — user runs it). Check status first: | Command | Key Flags | Output Fields | |---------|-----------|---------------| -| `verda s3 show` | `--profile` | Text key:value (NOT JSON): `s3_configured: false` only when unset; otherwise `access_key_loaded`, `secret_key_loaded`, `endpoint`, `region`. Configured ⇔ `access_key_loaded: true` | -| `verda s3 ls -o json` | — (lists buckets) | `buckets[]`: `name`, `created_at` | -| `verda s3 ls s3://bucket[/prefix] -o json` | `--recursive`, `--human-readable`, `--summarize` | `objects[]`: `key`, `size`, `modified`; `common_prefixes[]` | -| `verda s3 cp -o json` | `--recursive`, `--include`, `--exclude`, `--content-type`, `--part-size`, `--concurrency`, `--no-resume`, `--dryrun` | `transfers[]`: `source`, `destination`, `bytes`, `status`; `summary` | -| `verda s3 mv -o json` | same as `cp` (minus resume flags) | same as `cp` (`status: "moved"`) | -| `verda s3 rm s3://bucket/key -o json` | `--recursive`, `--include`, `--exclude`, `--dryrun`, **`--yes`** | `deleted[]`, `errors[]`, `dryrun` | -| `verda s3 sync -o json` | `--delete`, `--exact-timestamps`, `--include`, `--exclude`, `--dryrun` | `transfers[]`, `deleted[]`, `summary` | -| `verda s3 mb s3://bucket -o json` | — | `bucket`, `created` | -| `verda s3 rb s3://bucket -o json` | `--force` (empty first), **`--yes`** | `bucket`, `removed`, `objects_deleted` | -| `verda s3 presign s3://bucket/key -o json` | `--expires-in` (e.g. `15m`, `24h`; default `1h`) | `url`, `expires_at` (table mode prints the bare URL to stdout) | +| `verda object-storage show` | `--profile` | Text key:value (NOT JSON): `s3_configured: false` only when unset; otherwise `access_key_loaded`, `secret_key_loaded`, `endpoint`, `region`. Configured ⇔ `access_key_loaded: true` | +| `verda object-storage ls -o json` | — (lists buckets) | `buckets[]`: `name`, `created_at` | +| `verda object-storage ls s3://bucket[/prefix] -o json` | `--recursive`, `--human-readable`, `--summarize` | `objects[]`: `key`, `size`, `modified`; `common_prefixes[]` | +| `verda object-storage cp -o json` | `--recursive`, `--include`, `--exclude`, `--content-type`, `--part-size`, `--concurrency`, `--no-resume`, `--dryrun` | `transfers[]`: `source`, `destination`, `bytes`, `status`; `summary` | +| `verda object-storage mv -o json` | same as `cp` (minus resume flags) | same as `cp` (`status: "moved"`) | +| `verda object-storage rm s3://bucket/key -o json` | `--recursive`, `--include`, `--exclude`, `--dryrun`, **`--yes`** | `deleted[]`, `errors[]`, `dryrun` | +| `verda object-storage sync -o json` | `--delete`, `--exact-timestamps`, `--include`, `--exclude`, `--dryrun` | `transfers[]`, `deleted[]`, `summary` | +| `verda object-storage mb s3://bucket -o json` | — | `bucket`, `created` | +| `verda object-storage rb s3://bucket -o json` | `--force` (empty first), **`--yes`** | `bucket`, `removed`, `objects_deleted` | +| `verda object-storage presign s3://bucket/key -o json` | `--expires-in` (e.g. `15m`, `24h`; default `1h`) | `url`, `expires_at` (table mode prints the bare URL to stdout) | Rules: - **`src`/`dst`**: at least one must be an `s3://bucket/key` URI; the other may be a local path (upload/download) or another `s3://` URI (server-side copy). @@ -193,5 +194,5 @@ Rules: | volume ID | `volume list` | `id` | | VM ID / hostname | `vm list` | `id`, `hostname` | | template name | `template list` | `name` | -| bucket name | `s3 ls` | `buckets[].name` | -| object key | `s3 ls s3://bucket` | `objects[].key` | +| bucket name | `object-storage ls` | `buckets[].name` | +| object key | `object-storage ls s3://bucket` | `objects[].key` | diff --git a/internal/verda-cli/cmd/cmd.go b/internal/verda-cli/cmd/cmd.go index e2f8c1b..448e826 100644 --- a/internal/verda-cli/cmd/cmd.go +++ b/internal/verda-cli/cmd/cmd.go @@ -35,8 +35,8 @@ import ( "github.com/verda-cloud/verda-cli/internal/verda-cli/cmd/instancetypes" "github.com/verda-cloud/verda-cli/internal/verda-cli/cmd/locations" mcpcmd "github.com/verda-cloud/verda-cli/internal/verda-cli/cmd/mcp" + "github.com/verda-cloud/verda-cli/internal/verda-cli/cmd/objectstorage" "github.com/verda-cloud/verda-cli/internal/verda-cli/cmd/registry" - "github.com/verda-cloud/verda-cli/internal/verda-cli/cmd/s3" "github.com/verda-cloud/verda-cli/internal/verda-cli/cmd/serverless" "github.com/verda-cloud/verda-cli/internal/verda-cli/cmd/settings" "github.com/verda-cloud/verda-cli/internal/verda-cli/cmd/skills" @@ -81,7 +81,7 @@ func NewRootCommand(ioStreams cmdutil.IOStreams) (*cobra.Command, *clioptions.Op } // Commands that legitimately run without resolved credentials (mcp serve, - // auth show/use, registry/s3/skills trees, doctor). + // auth show/use, registry/object-storage/skills trees, doctor). if skipCredentialResolution(cmd) { log.Init(opts.Log) return nil @@ -136,7 +136,7 @@ func NewRootCommand(ioStreams cmdutil.IOStreams) (*cobra.Command, *clioptions.Op instancetypes.NewCmdInstanceTypes(f, ioStreams), locations.NewCmdLocations(f, ioStreams), registry.NewCmdRegistry(f, ioStreams), - s3.NewCmdS3(f, ioStreams), + objectstorage.NewCmdObjectStorage(f, ioStreams), sshkey.NewCmdSSHKey(f, ioStreams), startupscript.NewCmdStartupScript(f, ioStreams), template.NewCmdTemplate(f, ioStreams), @@ -230,7 +230,7 @@ func skipCredentialResolution(cmd *cobra.Command) bool { return true case pName == "skills": return true - case pName == "s3": + case pName == "object-storage": return true case pName == "registry": return true diff --git a/internal/verda-cli/cmd/s3/CLAUDE.md b/internal/verda-cli/cmd/objectstorage/CLAUDE.md similarity index 95% rename from internal/verda-cli/cmd/s3/CLAUDE.md rename to internal/verda-cli/cmd/objectstorage/CLAUDE.md index 1626f01..0d193b5 100644 --- a/internal/verda-cli/cmd/s3/CLAUDE.md +++ b/internal/verda-cli/cmd/objectstorage/CLAUDE.md @@ -1,7 +1,7 @@ # S3 Command Knowledge ## Quick Reference -- Parent: `verda s3` +- Parent: `verda object-storage` - Subcommands: `configure`, `show`, `ls`, `cp`, `mv`, `rm`, `sync`, `mb`, `rb`, `presign` - Files: - `s3.go` -- Parent command registration @@ -76,9 +76,9 @@ Do NOT escape the whole `bucket/key` as a single string -- S3 rejects a pre-esca - `aws-sdk-go-v2/feature/s3/manager` is deprecated upstream in favour of `feature/s3/transfermanager`. `//nolint:staticcheck` suppresses the warning in `transfer.go`. Swap to `transfermanager` when it ships a tagged release. - Integration test (`tests/integration/s3_test.go`) is gated by BOTH a build tag (`integration`) AND env var (`VERDA_S3_INTEGRATION=1`). Default `make test` never runs it. - `NewClient` assumes a non-nil `*options.S3Credentials`. `buildClientDefault` always passes a fresh `&options.S3Credentials{}` on load failure, to honour that contract rather than panic. -- `verda s3 show` with no S3 credentials still exits 0 (prints `s3_configured: false`). This is intentional -- it is a status command, not a validation command. +- `verda object-storage show` with no S3 credentials still exits 0 (prints `s3_configured: false`). This is intentional -- it is a status command, not a validation command. - `uri.go` `Parse` accepts `s3://bucket` (empty key) as well as `s3://bucket/key/with/slashes`. Callers must decide whether an empty key is valid for their verb. -- `presign` writes the URL to stdout and the expiration hint to stderr so the output is safe to pipe (`verda s3 presign ... | pbcopy`). +- `presign` writes the URL to stdout and the expiration hint to stderr so the output is safe to pipe (`verda object-storage presign ... | pbcopy`). - `sync --exact-timestamps` flips the mtime comparison from "newer source" to "different source"; otherwise near-identical mtimes can cause re-uploads. ## Relationships diff --git a/internal/verda-cli/cmd/s3/README.md b/internal/verda-cli/cmd/objectstorage/README.md similarity index 76% rename from internal/verda-cli/cmd/s3/README.md rename to internal/verda-cli/cmd/objectstorage/README.md index c72a45d..28a5252 100644 --- a/internal/verda-cli/cmd/s3/README.md +++ b/internal/verda-cli/cmd/objectstorage/README.md @@ -1,4 +1,4 @@ -# verda s3 -- S3-compatible object storage +# verda object-storage -- S3-compatible object storage AWS-CLI-style object storage commands for Verda's S3-compatible endpoint. Uses a separate credential set (keys prefixed `verda_s3_`) so object-storage access is independent of the main API credentials while still sharing the profile system. @@ -6,16 +6,16 @@ AWS-CLI-style object storage commands for Verda's S3-compatible endpoint. Uses a | Command | Description | |---------|-------------| -| `verda s3 configure` | Set up S3 credentials (wizard or flags) | -| `verda s3 show` | Print active S3 credential status (no secrets) | -| `verda s3 ls` | List buckets, or list keys under a prefix | -| `verda s3 cp` | Copy between local and S3, or S3 and S3 | -| `verda s3 mv` | Move (copy + delete source) | -| `verda s3 rm` | Delete one or many keys | -| `verda s3 sync` | Sync a directory and a prefix both directions | -| `verda s3 mb` | Make bucket | -| `verda s3 rb` | Remove bucket (optionally force-empty first) | -| `verda s3 presign` | Generate a time-limited GET URL for a key | +| `verda object-storage configure` | Set up S3 credentials (wizard or flags) | +| `verda object-storage show` | Print active S3 credential status (no secrets) | +| `verda object-storage ls` | List buckets, or list keys under a prefix | +| `verda object-storage cp` | Copy between local and S3, or S3 and S3 | +| `verda object-storage mv` | Move (copy + delete source) | +| `verda object-storage rm` | Delete one or many keys | +| `verda object-storage sync` | Sync a directory and a prefix both directions | +| `verda object-storage mb` | Make bucket | +| `verda object-storage rb` | Remove bucket (optionally force-empty first) | +| `verda object-storage presign` | Generate a time-limited GET URL for a key | ## Configuration @@ -26,58 +26,58 @@ Interactive wizard — the endpoint and region come pre-filled with defaults (`https://objects.fin-03.verda.storage`, `us-east-1`), so you normally just pick a profile and paste the access key + secret: ```bash -verda s3 configure +verda object-storage configure ``` Non-interactive (endpoint defaults if omitted; pass `--endpoint` for another region): ```bash -verda s3 configure \ +verda object-storage configure \ --access-key AKIA... \ --secret-key ... ``` Show the active configuration (no secrets are printed): ```bash -verda s3 show -verda s3 show --profile staging +verda object-storage show +verda object-storage show --profile staging ``` ## Listing ```bash -verda s3 ls # list all buckets -verda s3 ls s3://my-bucket # top-level keys + prefixes (delimiter /) -verda s3 ls s3://my-bucket --recursive # every key under the bucket -verda s3 ls s3://my-bucket --human-readable --summarize +verda object-storage ls # list all buckets +verda object-storage ls s3://my-bucket # top-level keys + prefixes (delimiter /) +verda object-storage ls s3://my-bucket --recursive # every key under the bucket +verda object-storage ls s3://my-bucket --human-readable --summarize ``` ## Copying ```bash # upload -verda s3 cp ./local-file s3://my-bucket/key.txt +verda object-storage cp ./local-file s3://my-bucket/key.txt # download -verda s3 cp s3://my-bucket/key.txt ./local-file +verda object-storage cp s3://my-bucket/key.txt ./local-file # server-side copy (S3 -> S3, no data traverses the client) -verda s3 cp s3://src-bucket/key s3://dst-bucket/key +verda object-storage cp s3://src-bucket/key s3://dst-bucket/key # recursive directory upload -verda s3 cp ./dir s3://my-bucket/prefix/ --recursive +verda object-storage cp ./dir s3://my-bucket/prefix/ --recursive # with include/exclude filters (match against relative path, * does not cross /) -verda s3 cp ./dir s3://my-bucket/prefix/ --recursive \ +verda object-storage cp ./dir s3://my-bucket/prefix/ --recursive \ --include '*.go' --exclude '*_test.go' # override content-type (otherwise inferred from extension) -verda s3 cp ./file s3://my-bucket/key --content-type 'application/json' +verda object-storage cp ./file s3://my-bucket/key --content-type 'application/json' # preview what would happen -verda s3 cp ./dir s3://my-bucket/prefix/ --recursive --dryrun +verda object-storage cp ./dir s3://my-bucket/prefix/ --recursive --dryrun # tune throughput for large transfers (uploads and single-object downloads) -verda s3 cp ./big.bin s3://my-bucket/big.bin --concurrency 16 --part-size 32MiB +verda object-storage cp ./big.bin s3://my-bucket/big.bin --concurrency 16 --part-size 32MiB ``` ### Resumable large transfers @@ -89,13 +89,13 @@ command** and it continues — only the missing parts are sent/fetched: ```bash # upload; if it breaks, run the SAME command again to resume -verda s3 cp ./model.safetensors s3://my-bucket/models/model.safetensors +verda object-storage cp ./model.safetensors s3://my-bucket/models/model.safetensors # download; re-run to resume (a partial .part is kept until it completes) -verda s3 cp s3://my-bucket/models/model.safetensors ./model.safetensors +verda object-storage cp s3://my-bucket/models/model.safetensors ./model.safetensors # force a fresh transfer, ignoring any saved progress -verda s3 cp s3://my-bucket/models/model.safetensors ./model.safetensors --no-resume +verda object-storage cp s3://my-bucket/models/model.safetensors ./model.safetensors --no-resume ``` Resume reuses the **same part size** that the interrupted run used. Passing a @@ -113,10 +113,10 @@ How it works: - Uploads reconcile against the server (`ListParts`); downloads guard against the object changing with an `If-Match` ETag check (a changed object restarts cleanly). - A same-host lock prevents two transfers of the same object running at once. -- For incomplete **uploads** specifically, `verda s3 ls-uploads` lists them and +- For incomplete **uploads** specifically, `verda object-storage ls-uploads` lists them and lets you pick one to resume; the staged parts cost storage until completed or - aborted (`verda s3 abort-uploads`). -- Interactive downloads from the `verda s3 ls` browser (per-object **Download** + aborted (`verda object-storage abort-uploads`). +- Interactive downloads from the `verda object-storage ls` browser (per-object **Download** or the **Download files here…** multi-select) use the same resumable path — re-selecting Download on an interrupted object resumes from its `.part`. They save to your **Downloads folder** (`~/Downloads`, created if missing; falls @@ -135,33 +135,33 @@ How it works: Same flag surface as `cp`; source is removed on success. ```bash -verda s3 mv ./tmpfile s3://my-bucket/final-name -verda s3 mv s3://my-bucket/old-key s3://my-bucket/new-key +verda object-storage mv ./tmpfile s3://my-bucket/final-name +verda object-storage mv s3://my-bucket/old-key s3://my-bucket/new-key ``` ## Syncing ```bash # local -> S3 -verda s3 sync ./local-dir s3://my-bucket/prefix/ +verda object-storage sync ./local-dir s3://my-bucket/prefix/ # S3 -> local -verda s3 sync s3://my-bucket/prefix/ ./local-dir +verda object-storage sync s3://my-bucket/prefix/ ./local-dir # remove destination files that don't exist in source (AWS-convention --delete) -verda s3 sync ./a s3://bucket/ --delete +verda object-storage sync ./a s3://bucket/ --delete # treat any mtime difference as "changed" (not just newer-source) -verda s3 sync ./a s3://bucket/ --exact-timestamps --dryrun +verda object-storage sync ./a s3://bucket/ --exact-timestamps --dryrun ``` ## Removing ```bash -verda s3 rm s3://bucket/key -verda s3 rm s3://bucket/prefix/ --recursive -verda s3 rm s3://bucket/prefix/ --recursive --include '*.log' --yes -verda s3 rm s3://bucket/prefix/ --recursive --dryrun +verda object-storage rm s3://bucket/key +verda object-storage rm s3://bucket/prefix/ --recursive +verda object-storage rm s3://bucket/prefix/ --recursive --include '*.log' --yes +verda object-storage rm s3://bucket/prefix/ --recursive --dryrun ``` Destructive; prompts for confirmation unless `--yes` is passed. In agent mode, `--yes` is mandatory. @@ -169,10 +169,10 @@ Destructive; prompts for confirmation unless `--yes` is passed. In agent mode, ` ## Buckets ```bash -verda s3 mb s3://new-bucket-name +verda object-storage mb s3://new-bucket-name -verda s3 rb s3://old-bucket # only works if empty -verda s3 rb s3://old-bucket --force # empty the bucket first, then remove +verda object-storage rb s3://old-bucket # only works if empty +verda object-storage rb s3://old-bucket --force # empty the bucket first, then remove ``` `rb` prompts for confirmation unless `--yes`; `--force` implies a recursive delete so be sure. @@ -180,14 +180,14 @@ verda s3 rb s3://old-bucket --force # empty the bucket first, then remove ## Presigned URLs ```bash -verda s3 presign s3://bucket/key # default 1h -verda s3 presign s3://bucket/key --expires-in 15m -verda s3 presign s3://bucket/key --expires-in 24h +verda object-storage presign s3://bucket/key # default 1h +verda object-storage presign s3://bucket/key --expires-in 15m +verda object-storage presign s3://bucket/key --expires-in 24h ``` The URL is printed to stdout (pipe-friendly); the expiration hint goes to stderr, e.g.: ```bash -verda s3 presign s3://bucket/key --expires-in 30m | pbcopy +verda object-storage presign s3://bucket/key --expires-in 30m | pbcopy ``` ## Output formats @@ -209,7 +209,7 @@ Per-file progress lines (`uploaded`, `downloaded`, `copied`, `moved`, `deleted`) Profiles work across both API and S3 credentials. Create a second profile via: ```bash -verda s3 configure --profile staging +verda object-storage configure --profile staging ``` `configure` and `show` take a local `--profile`. The other commands (`ls`/`cp`/`rm`/…) have no local `--profile` flag — select a profile with the global `--auth.profile staging`, `VERDA_PROFILE=staging`, or persist it with `verda auth use staging`. @@ -279,6 +279,6 @@ Wizard flow (`configure`): 5. S3 endpoint URL (pre-filled with `https://objects.fin-03.verda.storage`; must start with `http://`/`https://`) 6. S3 region (default `us-east-1`) -Steps are skipped individually when the corresponding flag is already set — so `verda s3 configure --access-key X --endpoint Y` only prompts for the secret and region, and `--profile staging` skips the profile picker entirely (targeting `[staging]`). +Steps are skipped individually when the corresponding flag is already set — so `verda object-storage configure --access-key X --endpoint Y` only prompts for the secret and region, and `--profile staging` skips the profile picker entirely (targeting `[staging]`). > Note: `configure` writes to the profile you pick/name here; it does **not** auto-follow the active profile the way the read commands (`ls`/`cp`/…) do. The picker defaulting to the active profile keeps the two aligned, but if you create credentials for a non-active profile, select it on the read commands with `--auth.profile ` / `VERDA_PROFILE`, or `verda auth use ` to switch. diff --git a/internal/verda-cli/cmd/s3/abortuploads.go b/internal/verda-cli/cmd/objectstorage/abortuploads.go similarity index 94% rename from internal/verda-cli/cmd/s3/abortuploads.go rename to internal/verda-cli/cmd/objectstorage/abortuploads.go index 70b2d82..af197c4 100644 --- a/internal/verda-cli/cmd/s3/abortuploads.go +++ b/internal/verda-cli/cmd/objectstorage/abortuploads.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "context" @@ -45,7 +45,7 @@ type abortUploadsOptions struct { Yes bool } -// NewCmdAbortUploads builds the `verda s3 abort-uploads` cobra command. +// NewCmdAbortUploads builds the `verda object-storage abort-uploads` cobra command. func NewCmdAbortUploads(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command { opts := &abortUploadsOptions{} @@ -55,7 +55,7 @@ func NewCmdAbortUploads(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.C Long: cmdutil.LongDesc(` Abort in-progress (incomplete) multipart uploads in a bucket. The staged parts of an incomplete upload consume real, billed storage - even though the object never appears in "verda s3 ls". Aborting + even though the object never appears in "verda object-storage ls". Aborting reclaims that storage. Use --older-than to abort only uploads initiated before a given age @@ -67,16 +67,16 @@ func NewCmdAbortUploads(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.C `), Example: cmdutil.Examples(` # Abort uploads older than 7 days - verda s3 abort-uploads s3://my-bucket --older-than 7d + verda object-storage abort-uploads s3://my-bucket --older-than 7d # Abort every in-progress upload (with confirmation) - verda s3 abort-uploads s3://my-bucket + verda object-storage abort-uploads s3://my-bucket # Abort uploads for a single key - verda s3 abort-uploads s3://my-bucket --key path/to/big.bin + verda object-storage abort-uploads s3://my-bucket --key path/to/big.bin # Skip the confirmation prompt - verda s3 abort-uploads s3://my-bucket --older-than 30d --yes + verda object-storage abort-uploads s3://my-bucket --older-than 30d --yes `), // 0 args on a TTY launches the bucket picker; an explicit s3://bucket // runs directly. --agent errors; non-TTY shows help (no silent prompt). diff --git a/internal/verda-cli/cmd/s3/browse.go b/internal/verda-cli/cmd/objectstorage/browse.go similarity index 99% rename from internal/verda-cli/cmd/s3/browse.go rename to internal/verda-cli/cmd/objectstorage/browse.go index bca30af..67f298c 100644 --- a/internal/verda-cli/cmd/s3/browse.go +++ b/internal/verda-cli/cmd/objectstorage/browse.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "context" @@ -51,7 +51,7 @@ type browseRow struct { size int64 } -// runLsBrowser is the interactive S3 explorer launched by `verda s3 ls` with no +// runLsBrowser is the interactive S3 explorer launched by `verda object-storage ls` with no // argument on a terminal. It walks buckets -> prefixes -> objects (one // ListObjectsV2 delimiter level at a time) and offers per-object actions // (download / info / delete). Esc ascends one level; Ctrl+C exits. diff --git a/internal/verda-cli/cmd/s3/browse_test.go b/internal/verda-cli/cmd/objectstorage/browse_test.go similarity index 99% rename from internal/verda-cli/cmd/s3/browse_test.go rename to internal/verda-cli/cmd/objectstorage/browse_test.go index 9c3ae76..d699736 100644 --- a/internal/verda-cli/cmd/s3/browse_test.go +++ b/internal/verda-cli/cmd/objectstorage/browse_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "bytes" diff --git a/internal/verda-cli/cmd/s3/checkpoint.go b/internal/verda-cli/cmd/objectstorage/checkpoint.go similarity index 99% rename from internal/verda-cli/cmd/s3/checkpoint.go rename to internal/verda-cli/cmd/objectstorage/checkpoint.go index 9902963..40ae621 100644 --- a/internal/verda-cli/cmd/s3/checkpoint.go +++ b/internal/verda-cli/cmd/objectstorage/checkpoint.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "crypto/sha256" diff --git a/internal/verda-cli/cmd/s3/checkpoint_test.go b/internal/verda-cli/cmd/objectstorage/checkpoint_test.go similarity index 99% rename from internal/verda-cli/cmd/s3/checkpoint_test.go rename to internal/verda-cli/cmd/objectstorage/checkpoint_test.go index ed7cc70..e8b847e 100644 --- a/internal/verda-cli/cmd/s3/checkpoint_test.go +++ b/internal/verda-cli/cmd/objectstorage/checkpoint_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "os" diff --git a/internal/verda-cli/cmd/s3/client.go b/internal/verda-cli/cmd/objectstorage/client.go similarity index 98% rename from internal/verda-cli/cmd/s3/client.go rename to internal/verda-cli/cmd/objectstorage/client.go index 8690afa..eea85ff 100644 --- a/internal/verda-cli/cmd/s3/client.go +++ b/internal/verda-cli/cmd/objectstorage/client.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "context" @@ -77,7 +77,7 @@ func NewClient(ctx context.Context, creds *options.S3Credentials, authMode strin if accessKey == "" || secretKey == "" { return nil, errors.New("no S3 credentials configured\n\n" + - "Run \"verda s3 configure\" to set up S3 access") + "Run \"verda object-storage configure\" to set up S3 access") } cfg, err := awsconfig.LoadDefaultConfig(ctx, diff --git a/internal/verda-cli/cmd/s3/client_test.go b/internal/verda-cli/cmd/objectstorage/client_test.go similarity index 98% rename from internal/verda-cli/cmd/s3/client_test.go rename to internal/verda-cli/cmd/objectstorage/client_test.go index 00ed9f8..2746d30 100644 --- a/internal/verda-cli/cmd/s3/client_test.go +++ b/internal/verda-cli/cmd/objectstorage/client_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "testing" diff --git a/internal/verda-cli/cmd/s3/configure.go b/internal/verda-cli/cmd/objectstorage/configure.go similarity index 97% rename from internal/verda-cli/cmd/s3/configure.go rename to internal/verda-cli/cmd/objectstorage/configure.go index eb4a719..3e26267 100644 --- a/internal/verda-cli/cmd/s3/configure.go +++ b/internal/verda-cli/cmd/objectstorage/configure.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "fmt" @@ -64,16 +64,16 @@ func NewCmdConfigure(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Comm `), Example: cmdutil.Examples(` # Interactive wizard (prompts for all fields) - verda s3 configure + verda object-storage configure # Non-interactive with flags - verda s3 configure \ + verda object-storage configure \ --access-key AKIA1234567890EXAMPLE \ --secret-key wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLE \ --endpoint https://objects.lab.verda.storage # Different profile - verda s3 configure \ + verda object-storage configure \ --profile staging \ --access-key AKIA... \ --secret-key ... \ diff --git a/internal/verda-cli/cmd/s3/configure_test.go b/internal/verda-cli/cmd/objectstorage/configure_test.go similarity index 99% rename from internal/verda-cli/cmd/s3/configure_test.go rename to internal/verda-cli/cmd/objectstorage/configure_test.go index fa85c7a..dbcb6cb 100644 --- a/internal/verda-cli/cmd/s3/configure_test.go +++ b/internal/verda-cli/cmd/objectstorage/configure_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "bytes" diff --git a/internal/verda-cli/cmd/s3/cp.go b/internal/verda-cli/cmd/objectstorage/cp.go similarity index 96% rename from internal/verda-cli/cmd/s3/cp.go rename to internal/verda-cli/cmd/objectstorage/cp.go index e1578a4..7a88a53 100644 --- a/internal/verda-cli/cmd/s3/cp.go +++ b/internal/verda-cli/cmd/objectstorage/cp.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "context" @@ -114,7 +114,7 @@ type cpPayload struct { Dryrun bool `json:"dryrun" yaml:"dryrun"` } -// NewCmdCp builds the `verda s3 cp` cobra command. +// NewCmdCp builds the `verda object-storage cp` cobra command. func NewCmdCp(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command { opts := &cpOptions{} @@ -135,48 +135,48 @@ func NewCmdCp(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command { and parallel, and they RESUME: re-run the EXACT same command to continue an interrupted transfer (only the missing parts move). --no-resume starts over; --concurrency / --part-size tune throughput. - Interactive downloads from the "verda s3 ls" browser resume the same way. + Interactive downloads from the "verda object-storage ls" browser resume the same way. With --dryrun, the planned transfers are listed but no SDK calls are made. `), Example: cmdutil.Examples(` # Upload a single file - verda s3 cp ./report.csv s3://my-bucket/reports/report.csv + verda object-storage cp ./report.csv s3://my-bucket/reports/report.csv # Upload into a "folder" (trailing slash keeps the filename) - verda s3 cp ./report.csv s3://my-bucket/reports/ + verda object-storage cp ./report.csv s3://my-bucket/reports/ # Download a single object - verda s3 cp s3://my-bucket/report.csv ./report.csv + verda object-storage cp s3://my-bucket/report.csv ./report.csv # Download into a directory (keeps the object's name) - verda s3 cp s3://my-bucket/report.csv ./downloads/ + verda object-storage cp s3://my-bucket/report.csv ./downloads/ # Recursively download a whole prefix - verda s3 cp s3://my-bucket/logs/ ./logs --recursive + verda object-storage cp s3://my-bucket/logs/ ./logs --recursive # Resume an interrupted upload or download — re-run the same command - verda s3 cp ./model.bin s3://my-bucket/model.bin - verda s3 cp s3://my-bucket/model.bin ./model.bin + verda object-storage cp ./model.bin s3://my-bucket/model.bin + verda object-storage cp s3://my-bucket/model.bin ./model.bin # Faster large transfer - verda s3 cp s3://my-bucket/model.bin ./model.bin --concurrency 16 --part-size 32MiB + verda object-storage cp s3://my-bucket/model.bin ./model.bin --concurrency 16 --part-size 32MiB # Copy between buckets - verda s3 cp s3://src/a.txt s3://dst/b.txt + verda object-storage cp s3://src/a.txt s3://dst/b.txt # Recursive upload with filter - verda s3 cp ./data s3://my-bucket/data/ --recursive --include "*.csv" + verda object-storage cp ./data s3://my-bucket/data/ --recursive --include "*.csv" # Recursive upload, skipping temp files - verda s3 cp ./site s3://my-bucket/site/ --recursive --exclude "*.tmp" + verda object-storage cp ./site s3://my-bucket/site/ --recursive --exclude "*.tmp" # Override the content type on upload - verda s3 cp ./page.html s3://my-bucket/page.html --content-type text/html + verda object-storage cp ./page.html s3://my-bucket/page.html --content-type text/html # Preview a recursive download - verda s3 cp s3://my-bucket/logs/ ./logs --recursive --dryrun + verda object-storage cp s3://my-bucket/logs/ ./logs --recursive --dryrun `), // 2 args = direct cp. Fewer args on a TTY guides an upload interactively // (source -> bucket -> location); pipes/--agent still require both args. @@ -190,7 +190,7 @@ func NewCmdCp(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command { if interactive && !loneS3 { return runUploadWizard(cmd, f, ioStreams, opts, args) } - return cmdutil.UsageErrorf(cmd, "cp requires a source and destination: verda s3 cp ") + return cmdutil.UsageErrorf(cmd, "cp requires a source and destination: verda object-storage cp ") }, } diff --git a/internal/verda-cli/cmd/s3/cp_resume_test.go b/internal/verda-cli/cmd/objectstorage/cp_resume_test.go similarity index 99% rename from internal/verda-cli/cmd/s3/cp_resume_test.go rename to internal/verda-cli/cmd/objectstorage/cp_resume_test.go index c775eb7..dada5a4 100644 --- a/internal/verda-cli/cmd/s3/cp_resume_test.go +++ b/internal/verda-cli/cmd/objectstorage/cp_resume_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "bytes" diff --git a/internal/verda-cli/cmd/s3/cp_test.go b/internal/verda-cli/cmd/objectstorage/cp_test.go similarity index 99% rename from internal/verda-cli/cmd/s3/cp_test.go rename to internal/verda-cli/cmd/objectstorage/cp_test.go index 23cd5e0..4ddf471 100644 --- a/internal/verda-cli/cmd/s3/cp_test.go +++ b/internal/verda-cli/cmd/objectstorage/cp_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "bytes" diff --git a/internal/verda-cli/cmd/s3/errors.go b/internal/verda-cli/cmd/objectstorage/errors.go similarity index 99% rename from internal/verda-cli/cmd/s3/errors.go rename to internal/verda-cli/cmd/objectstorage/errors.go index 07612ee..20e1503 100644 --- a/internal/verda-cli/cmd/s3/errors.go +++ b/internal/verda-cli/cmd/objectstorage/errors.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "errors" diff --git a/internal/verda-cli/cmd/s3/errors_test.go b/internal/verda-cli/cmd/objectstorage/errors_test.go similarity index 99% rename from internal/verda-cli/cmd/s3/errors_test.go rename to internal/verda-cli/cmd/objectstorage/errors_test.go index 5b86e1b..f78e716 100644 --- a/internal/verda-cli/cmd/s3/errors_test.go +++ b/internal/verda-cli/cmd/objectstorage/errors_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "errors" diff --git a/internal/verda-cli/cmd/s3/helper.go b/internal/verda-cli/cmd/objectstorage/helper.go similarity index 98% rename from internal/verda-cli/cmd/s3/helper.go rename to internal/verda-cli/cmd/objectstorage/helper.go index fc3e4b6..8584f99 100644 --- a/internal/verda-cli/cmd/s3/helper.go +++ b/internal/verda-cli/cmd/objectstorage/helper.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "context" @@ -55,7 +55,7 @@ func buildClientDefault(ctx context.Context, f cmdutil.Factory, ov ClientOverrid // so AuthOptions.Profile is not auto-resolved. options.ActiveProfile honors the // --auth.profile flag, VERDA_PROFILE, and the `verda auth use` config setting; // only when none is set do we fall back to defaultProfileName ("[default]", the -// section `verda s3 configure` writes). +// section `verda object-storage configure` writes). func loadCredsFromFactory(f cmdutil.Factory) (*options.S3Credentials, error) { profile := options.ActiveProfile(f.Options().AuthOptions.Profile) if profile == "" { @@ -67,7 +67,7 @@ func loadCredsFromFactory(f cmdutil.Factory) (*options.S3Credentials, error) { } creds, err := options.LoadS3CredentialsForProfile(path, profile) if err != nil { - return &options.S3Credentials{}, nil //nolint:nilerr // intentional: missing creds → empty struct so NewClient surfaces the "verda s3 configure" hint + return &options.S3Credentials{}, nil //nolint:nilerr // intentional: missing creds → empty struct so NewClient surfaces the "verda object-storage configure" hint } return creds, nil } diff --git a/internal/verda-cli/cmd/s3/helper_test.go b/internal/verda-cli/cmd/objectstorage/helper_test.go similarity index 93% rename from internal/verda-cli/cmd/s3/helper_test.go rename to internal/verda-cli/cmd/objectstorage/helper_test.go index 46ba25d..cb725fb 100644 --- a/internal/verda-cli/cmd/s3/helper_test.go +++ b/internal/verda-cli/cmd/objectstorage/helper_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "context" @@ -47,8 +47,8 @@ func TestBuildClientUsesSwap(t *testing.T) { } // TestLoadCredsFromFactoryFallsBackToDefaultProfile is a regression test for -// the bug where `verda s3 ls` reported "no S3 credentials configured" even -// after `verda s3 configure` saved them to the [default] profile. S3 commands +// the bug where `verda object-storage ls` reported "no S3 credentials configured" even +// after `verda object-storage configure` saved them to the [default] profile. S3 commands // skip Options.Complete(), so AuthOptions.Profile stays empty — passing "" // to ini.GetSection loaded the synthetic DEFAULT section (with no keys) // instead of the user's [default] section. diff --git a/internal/verda-cli/cmd/s3/lock.go b/internal/verda-cli/cmd/objectstorage/lock.go similarity index 98% rename from internal/verda-cli/cmd/s3/lock.go rename to internal/verda-cli/cmd/objectstorage/lock.go index 35d3029..ff4d529 100644 --- a/internal/verda-cli/cmd/s3/lock.go +++ b/internal/verda-cli/cmd/objectstorage/lock.go @@ -14,7 +14,7 @@ //go:build !windows -package s3 +package objectstorage import ( "errors" diff --git a/internal/verda-cli/cmd/s3/lock_test.go b/internal/verda-cli/cmd/objectstorage/lock_test.go similarity index 98% rename from internal/verda-cli/cmd/s3/lock_test.go rename to internal/verda-cli/cmd/objectstorage/lock_test.go index d692a4d..4cb49b6 100644 --- a/internal/verda-cli/cmd/s3/lock_test.go +++ b/internal/verda-cli/cmd/objectstorage/lock_test.go @@ -14,7 +14,7 @@ //go:build !windows -package s3 +package objectstorage import "testing" diff --git a/internal/verda-cli/cmd/s3/lock_windows.go b/internal/verda-cli/cmd/objectstorage/lock_windows.go similarity index 97% rename from internal/verda-cli/cmd/s3/lock_windows.go rename to internal/verda-cli/cmd/objectstorage/lock_windows.go index 1edb57f..dc71945 100644 --- a/internal/verda-cli/cmd/s3/lock_windows.go +++ b/internal/verda-cli/cmd/objectstorage/lock_windows.go @@ -14,7 +14,7 @@ //go:build windows -package s3 +package objectstorage // acquireTransferLock is a no-op on Windows: syscall.Flock is unavailable and the // CLI targets macOS/Linux. Same-host upload concurrency is not guarded here. diff --git a/internal/verda-cli/cmd/s3/ls.go b/internal/verda-cli/cmd/objectstorage/ls.go similarity index 97% rename from internal/verda-cli/cmd/s3/ls.go rename to internal/verda-cli/cmd/objectstorage/ls.go index 7e5ee72..ed94b07 100644 --- a/internal/verda-cli/cmd/s3/ls.go +++ b/internal/verda-cli/cmd/objectstorage/ls.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "context" @@ -78,19 +78,19 @@ func NewCmdLs(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command { `), Example: cmdutil.Examples(` # List all buckets - verda s3 ls + verda object-storage ls # List top-level keys under a bucket - verda s3 ls s3://my-bucket + verda object-storage ls s3://my-bucket # List keys under a prefix - verda s3 ls s3://my-bucket/prefix/ + verda object-storage ls s3://my-bucket/prefix/ # Recursively list every key in the bucket - verda s3 ls s3://my-bucket --recursive + verda object-storage ls s3://my-bucket --recursive # Human-readable sizes + summary - verda s3 ls s3://my-bucket --human-readable --summarize + verda object-storage ls s3://my-bucket --human-readable --summarize `), Args: cobra.MaximumNArgs(1), RunE: func(cmd *cobra.Command, args []string) error { diff --git a/internal/verda-cli/cmd/s3/ls_test.go b/internal/verda-cli/cmd/objectstorage/ls_test.go similarity index 99% rename from internal/verda-cli/cmd/s3/ls_test.go rename to internal/verda-cli/cmd/objectstorage/ls_test.go index 1c461e1..2f7c001 100644 --- a/internal/verda-cli/cmd/s3/ls_test.go +++ b/internal/verda-cli/cmd/objectstorage/ls_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "bytes" diff --git a/internal/verda-cli/cmd/s3/lsuploads.go b/internal/verda-cli/cmd/objectstorage/lsuploads.go similarity index 94% rename from internal/verda-cli/cmd/s3/lsuploads.go rename to internal/verda-cli/cmd/objectstorage/lsuploads.go index cab9da1..83ccbe5 100644 --- a/internal/verda-cli/cmd/s3/lsuploads.go +++ b/internal/verda-cli/cmd/objectstorage/lsuploads.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "context" @@ -44,7 +44,7 @@ type lsUploadsOptions struct { Prefix string } -// NewCmdLsUploads builds the `verda s3 ls-uploads` cobra command. +// NewCmdLsUploads builds the `verda object-storage ls-uploads` cobra command. func NewCmdLsUploads(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command { opts := &lsUploadsOptions{} @@ -54,21 +54,21 @@ func NewCmdLsUploads(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Comm Long: cmdutil.LongDesc(` List in-progress multipart uploads in a bucket. The staged parts of an incomplete upload consume real storage and are billed even though - the object does not appear in "verda s3 ls". This command surfaces + the object does not appear in "verda object-storage ls". This command surfaces that hidden cost: key, UploadId, when it was initiated, and the accumulated size of the parts uploaded so far. - Use "verda s3 abort-uploads" to reclaim the storage. + Use "verda object-storage abort-uploads" to reclaim the storage. `), Example: cmdutil.Examples(` # List every in-progress upload in a bucket - verda s3 ls-uploads s3://my-bucket + verda object-storage ls-uploads s3://my-bucket # Only uploads under a key prefix - verda s3 ls-uploads s3://my-bucket --prefix logs/ + verda object-storage ls-uploads s3://my-bucket --prefix logs/ # Machine-readable output - verda s3 ls-uploads s3://my-bucket -o json + verda object-storage ls-uploads s3://my-bucket -o json `), // 0 args on a TTY launches the bucket picker; an explicit s3://bucket // runs directly. --agent errors; non-TTY shows help (no silent prompt). diff --git a/internal/verda-cli/cmd/s3/mb.go b/internal/verda-cli/cmd/objectstorage/mb.go similarity index 94% rename from internal/verda-cli/cmd/s3/mb.go rename to internal/verda-cli/cmd/objectstorage/mb.go index 12a90f5..623b53a 100644 --- a/internal/verda-cli/cmd/s3/mb.go +++ b/internal/verda-cli/cmd/objectstorage/mb.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "context" @@ -30,7 +30,7 @@ type mbPayload struct { Created bool `json:"created" yaml:"created"` } -// NewCmdMb builds the `verda s3 mb` cobra command. +// NewCmdMb builds the `verda object-storage mb` cobra command. func NewCmdMb(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command { cmd := &cobra.Command{ Use: "mb s3://bucket", @@ -43,10 +43,10 @@ func NewCmdMb(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command { `), Example: cmdutil.Examples(` # Create a new bucket - verda s3 mb s3://my-new-bucket + verda object-storage mb s3://my-new-bucket # Prompt for the name interactively - verda s3 mb + verda object-storage mb `), // 0 args on a TTY prompts for the name; an explicit s3://bucket runs // directly. --agent/non-TTY with no arg errors or shows help. diff --git a/internal/verda-cli/cmd/s3/mb_test.go b/internal/verda-cli/cmd/objectstorage/mb_test.go similarity index 99% rename from internal/verda-cli/cmd/s3/mb_test.go rename to internal/verda-cli/cmd/objectstorage/mb_test.go index 9fc29c0..82d88da 100644 --- a/internal/verda-cli/cmd/s3/mb_test.go +++ b/internal/verda-cli/cmd/objectstorage/mb_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "bytes" diff --git a/internal/verda-cli/cmd/s3/move_wizard.go b/internal/verda-cli/cmd/objectstorage/move_wizard.go similarity index 98% rename from internal/verda-cli/cmd/s3/move_wizard.go rename to internal/verda-cli/cmd/objectstorage/move_wizard.go index 8a0d3a4..cfc40b3 100644 --- a/internal/verda-cli/cmd/s3/move_wizard.go +++ b/internal/verda-cli/cmd/objectstorage/move_wizard.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "context" @@ -291,7 +291,7 @@ func finalizeMove(ctx context.Context, cmd *cobra.Command, f cmdutil.Factory, io dstURI = URI{Bucket: dstBucket, Key: dstKey} } - _, _ = fmt.Fprintf(ioStreams.ErrOut, "\n Will run: verda s3 mv %s %s\n\n", srcURI.String(), dstURI.String()) + _, _ = fmt.Fprintf(ioStreams.ErrOut, "\n Will run: verda object-storage mv %s %s\n\n", srcURI.String(), dstURI.String()) confirmed, cerr := f.Prompter().Confirm(ctx, "Proceed with move?", tui.WithConfirmDefault(true)) if cerr != nil { if cmdutil.IsPromptCancel(cerr) { diff --git a/internal/verda-cli/cmd/s3/mpdownload.go b/internal/verda-cli/cmd/objectstorage/mpdownload.go similarity index 99% rename from internal/verda-cli/cmd/s3/mpdownload.go rename to internal/verda-cli/cmd/objectstorage/mpdownload.go index 0854ca3..adb9719 100644 --- a/internal/verda-cli/cmd/s3/mpdownload.go +++ b/internal/verda-cli/cmd/objectstorage/mpdownload.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "context" diff --git a/internal/verda-cli/cmd/s3/mpdownload_test.go b/internal/verda-cli/cmd/objectstorage/mpdownload_test.go similarity index 99% rename from internal/verda-cli/cmd/s3/mpdownload_test.go rename to internal/verda-cli/cmd/objectstorage/mpdownload_test.go index e54e8a0..d7c4045 100644 --- a/internal/verda-cli/cmd/s3/mpdownload_test.go +++ b/internal/verda-cli/cmd/objectstorage/mpdownload_test.go @@ -14,7 +14,7 @@ //go:build !windows -package s3 +package objectstorage import ( "bytes" diff --git a/internal/verda-cli/cmd/s3/mpupload.go b/internal/verda-cli/cmd/objectstorage/mpupload.go similarity index 99% rename from internal/verda-cli/cmd/s3/mpupload.go rename to internal/verda-cli/cmd/objectstorage/mpupload.go index 3b2c242..8fe747e 100644 --- a/internal/verda-cli/cmd/s3/mpupload.go +++ b/internal/verda-cli/cmd/objectstorage/mpupload.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "context" diff --git a/internal/verda-cli/cmd/s3/mpupload_test.go b/internal/verda-cli/cmd/objectstorage/mpupload_test.go similarity index 99% rename from internal/verda-cli/cmd/s3/mpupload_test.go rename to internal/verda-cli/cmd/objectstorage/mpupload_test.go index 2fba703..b4a9d1b 100644 --- a/internal/verda-cli/cmd/s3/mpupload_test.go +++ b/internal/verda-cli/cmd/objectstorage/mpupload_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "context" diff --git a/internal/verda-cli/cmd/s3/mv.go b/internal/verda-cli/cmd/objectstorage/mv.go similarity index 96% rename from internal/verda-cli/cmd/s3/mv.go rename to internal/verda-cli/cmd/objectstorage/mv.go index 871a183..a83af45 100644 --- a/internal/verda-cli/cmd/s3/mv.go +++ b/internal/verda-cli/cmd/objectstorage/mv.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "context" @@ -29,7 +29,7 @@ import ( cmdutil "github.com/verda-cloud/verda-cli/internal/verda-cli/cmd/util" ) -// NewCmdMv builds the `verda s3 mv` cobra command. A move is a copy followed +// NewCmdMv builds the `verda object-storage mv` cobra command. A move is a copy followed // by a delete of the source, and is implemented by reusing the same transfer // primitives the cp command uses. The source is only removed once the // transfer portion has succeeded — if transfer fails for an entry, that @@ -56,22 +56,22 @@ func NewCmdMv(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command { `), Example: cmdutil.Examples(` # Move a single file to S3 (removes the local source on success) - verda s3 mv ./report.csv s3://my-bucket/reports/report.csv + verda object-storage mv ./report.csv s3://my-bucket/reports/report.csv # Move an object out of S3 to local disk - verda s3 mv s3://my-bucket/report.csv ./report.csv + verda object-storage mv s3://my-bucket/report.csv ./report.csv # Move between buckets - verda s3 mv s3://src/a.txt s3://dst/b.txt + verda object-storage mv s3://src/a.txt s3://dst/b.txt # Recursive move of every .csv file under a directory - verda s3 mv ./data s3://my-bucket/data/ --recursive --include "*.csv" + verda object-storage mv ./data s3://my-bucket/data/ --recursive --include "*.csv" # Preview a recursive move - verda s3 mv s3://my-bucket/logs/ ./logs --recursive --dryrun + verda object-storage mv s3://my-bucket/logs/ ./logs --recursive --dryrun # Move/rename an object interactively (S3 -> S3) - verda s3 mv + verda object-storage mv `), // 2 args = direct move. On a TTY, fewer args (none, or a single s3:// URI) // launch the S3->S3 move/rename wizard. Local moves still need both args. @@ -87,7 +87,7 @@ func NewCmdMv(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command { return cmd.Help() } if len(args) == 1 && !IsS3URI(args[0]) { - return cmdutil.UsageErrorf(cmd, "mv requires a source and destination: verda s3 mv ") + return cmdutil.UsageErrorf(cmd, "mv requires a source and destination: verda object-storage mv ") } return runMoveWizard(cmd, f, ioStreams, opts, args) }, diff --git a/internal/verda-cli/cmd/s3/mv_test.go b/internal/verda-cli/cmd/objectstorage/mv_test.go similarity index 99% rename from internal/verda-cli/cmd/s3/mv_test.go rename to internal/verda-cli/cmd/objectstorage/mv_test.go index 228d48e..2124874 100644 --- a/internal/verda-cli/cmd/s3/mv_test.go +++ b/internal/verda-cli/cmd/objectstorage/mv_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "bytes" diff --git a/internal/verda-cli/cmd/s3/s3.go b/internal/verda-cli/cmd/objectstorage/objectstorage.go similarity index 81% rename from internal/verda-cli/cmd/s3/s3.go rename to internal/verda-cli/cmd/objectstorage/objectstorage.go index c3cba1f..0886a02 100644 --- a/internal/verda-cli/cmd/s3/s3.go +++ b/internal/verda-cli/cmd/objectstorage/objectstorage.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "github.com/spf13/cobra" @@ -20,11 +20,12 @@ import ( cmdutil "github.com/verda-cloud/verda-cli/internal/verda-cli/cmd/util" ) -// NewCmdS3 creates the parent s3 command. -func NewCmdS3(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command { +// NewCmdObjectStorage creates the parent object-storage command. +func NewCmdObjectStorage(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command { cmd := &cobra.Command{ - Use: "s3", - Short: "Manage S3 object storage", + Use: "object-storage", + Aliases: []string{"oss", "d4"}, + Short: "Manage S3 object storage", Long: cmdutil.LongDesc(` Manage S3-compatible object storage credentials and operations. @@ -32,10 +33,10 @@ func NewCmdS3(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command { same credentials file (~/.verda/credentials) using verda_s3_ prefixed keys. Configure credentials: - verda s3 configure + verda object-storage configure Show current S3 credential status: - verda s3 show + verda object-storage show `), Annotations: map[string]string{cmdutil.TagAnnotation: "beta"}, Run: cmdutil.DefaultSubCommandRun(ioStreams.Out), diff --git a/internal/verda-cli/cmd/s3/path.go b/internal/verda-cli/cmd/objectstorage/path.go similarity index 97% rename from internal/verda-cli/cmd/s3/path.go rename to internal/verda-cli/cmd/objectstorage/path.go index adb1c34..c96ef25 100644 --- a/internal/verda-cli/cmd/s3/path.go +++ b/internal/verda-cli/cmd/objectstorage/path.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "os" diff --git a/internal/verda-cli/cmd/s3/picker.go b/internal/verda-cli/cmd/objectstorage/picker.go similarity index 99% rename from internal/verda-cli/cmd/s3/picker.go rename to internal/verda-cli/cmd/objectstorage/picker.go index d3796e8..c869c8a 100644 --- a/internal/verda-cli/cmd/s3/picker.go +++ b/internal/verda-cli/cmd/objectstorage/picker.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "context" diff --git a/internal/verda-cli/cmd/s3/picker_test.go b/internal/verda-cli/cmd/objectstorage/picker_test.go similarity index 99% rename from internal/verda-cli/cmd/s3/picker_test.go rename to internal/verda-cli/cmd/objectstorage/picker_test.go index 1e4fce0..ba931e6 100644 --- a/internal/verda-cli/cmd/s3/picker_test.go +++ b/internal/verda-cli/cmd/objectstorage/picker_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "bytes" diff --git a/internal/verda-cli/cmd/s3/presign.go b/internal/verda-cli/cmd/objectstorage/presign.go similarity index 93% rename from internal/verda-cli/cmd/s3/presign.go rename to internal/verda-cli/cmd/objectstorage/presign.go index e694e81..5b9580e 100644 --- a/internal/verda-cli/cmd/s3/presign.go +++ b/internal/verda-cli/cmd/objectstorage/presign.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "context" @@ -60,7 +60,7 @@ type presignOptions struct { ExpiresIn time.Duration } -// NewCmdPresign builds the `verda s3 presign` cobra command. +// NewCmdPresign builds the `verda object-storage presign` cobra command. func NewCmdPresign(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command { opts := &presignOptions{ExpiresIn: time.Hour} @@ -73,9 +73,9 @@ func NewCmdPresign(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Comman the duration given by --expires-in (default 1h). `), Example: cmdutil.Examples(` - verda s3 presign s3://my-bucket/report.csv - verda s3 presign s3://my-bucket/report.csv --expires-in 15m - verda s3 presign s3://my-bucket/report.csv --expires-in 24h + verda object-storage presign s3://my-bucket/report.csv + verda object-storage presign s3://my-bucket/report.csv --expires-in 15m + verda object-storage presign s3://my-bucket/report.csv --expires-in 24h `), Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { diff --git a/internal/verda-cli/cmd/s3/presign_test.go b/internal/verda-cli/cmd/objectstorage/presign_test.go similarity index 99% rename from internal/verda-cli/cmd/s3/presign_test.go rename to internal/verda-cli/cmd/objectstorage/presign_test.go index 3b6b66c..bcf5691 100644 --- a/internal/verda-cli/cmd/s3/presign_test.go +++ b/internal/verda-cli/cmd/objectstorage/presign_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "bytes" diff --git a/internal/verda-cli/cmd/s3/rb.go b/internal/verda-cli/cmd/objectstorage/rb.go similarity index 96% rename from internal/verda-cli/cmd/s3/rb.go rename to internal/verda-cli/cmd/objectstorage/rb.go index 57c92c9..e136ef2 100644 --- a/internal/verda-cli/cmd/s3/rb.go +++ b/internal/verda-cli/cmd/objectstorage/rb.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "context" @@ -42,7 +42,7 @@ type rbPayload struct { ObjectsDeleted int `json:"objects_deleted" yaml:"objects_deleted"` } -// NewCmdRb builds the `verda s3 rb` cobra command. +// NewCmdRb builds the `verda object-storage rb` cobra command. func NewCmdRb(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command { opts := &rbOptions{} @@ -58,13 +58,13 @@ func NewCmdRb(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command { `), Example: cmdutil.Examples(` # Remove an empty bucket - verda s3 rb s3://my-bucket + verda object-storage rb s3://my-bucket # Remove a non-empty bucket (deletes all objects first) - verda s3 rb s3://my-bucket --force + verda object-storage rb s3://my-bucket --force # Skip confirmation prompt - verda s3 rb s3://my-bucket --yes + verda object-storage rb s3://my-bucket --yes `), // 0 args on a TTY launches the bucket picker; an explicit s3://bucket // runs directly. --agent/non-TTY with no arg errors or shows help. diff --git a/internal/verda-cli/cmd/s3/rb_test.go b/internal/verda-cli/cmd/objectstorage/rb_test.go similarity index 99% rename from internal/verda-cli/cmd/s3/rb_test.go rename to internal/verda-cli/cmd/objectstorage/rb_test.go index 5cd904a..86ae2b6 100644 --- a/internal/verda-cli/cmd/s3/rb_test.go +++ b/internal/verda-cli/cmd/objectstorage/rb_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "bytes" diff --git a/internal/verda-cli/cmd/s3/resume_uploads.go b/internal/verda-cli/cmd/objectstorage/resume_uploads.go similarity index 99% rename from internal/verda-cli/cmd/s3/resume_uploads.go rename to internal/verda-cli/cmd/objectstorage/resume_uploads.go index 34b0dbc..1f98a3b 100644 --- a/internal/verda-cli/cmd/s3/resume_uploads.go +++ b/internal/verda-cli/cmd/objectstorage/resume_uploads.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "context" diff --git a/internal/verda-cli/cmd/s3/resume_uploads_test.go b/internal/verda-cli/cmd/objectstorage/resume_uploads_test.go similarity index 99% rename from internal/verda-cli/cmd/s3/resume_uploads_test.go rename to internal/verda-cli/cmd/objectstorage/resume_uploads_test.go index cd0ae62..a0ced6a 100644 --- a/internal/verda-cli/cmd/s3/resume_uploads_test.go +++ b/internal/verda-cli/cmd/objectstorage/resume_uploads_test.go @@ -14,7 +14,7 @@ //go:build !windows -package s3 +package objectstorage import ( "bytes" diff --git a/internal/verda-cli/cmd/s3/rm.go b/internal/verda-cli/cmd/objectstorage/rm.go similarity index 96% rename from internal/verda-cli/cmd/s3/rm.go rename to internal/verda-cli/cmd/objectstorage/rm.go index cc88d21..3a82215 100644 --- a/internal/verda-cli/cmd/s3/rm.go +++ b/internal/verda-cli/cmd/objectstorage/rm.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "context" @@ -54,7 +54,7 @@ type rmPayload struct { Dryrun bool `json:"dryrun" yaml:"dryrun"` } -// NewCmdRm builds the `verda s3 rm` cobra command. +// NewCmdRm builds the `verda object-storage rm` cobra command. func NewCmdRm(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command { opts := &rmOptions{} @@ -77,25 +77,25 @@ func NewCmdRm(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command { `), Example: cmdutil.Examples(` # Delete a single object - verda s3 rm s3://my-bucket/path/to/obj.txt + verda object-storage rm s3://my-bucket/path/to/obj.txt # Recursively delete every object under a prefix - verda s3 rm s3://my-bucket/logs/ --recursive + verda object-storage rm s3://my-bucket/logs/ --recursive # Only delete .txt files, keep everything else - verda s3 rm s3://my-bucket/data/ --recursive --include "*.txt" + verda object-storage rm s3://my-bucket/data/ --recursive --include "*.txt" # Delete everything except .log files - verda s3 rm s3://my-bucket/data/ --recursive --exclude "*.log" + verda object-storage rm s3://my-bucket/data/ --recursive --exclude "*.log" # Preview without deleting - verda s3 rm s3://my-bucket/data/ --recursive --dryrun + verda object-storage rm s3://my-bucket/data/ --recursive --dryrun # Skip confirmation - verda s3 rm s3://my-bucket/obj --yes + verda object-storage rm s3://my-bucket/obj --yes # Browse and tick files to delete interactively - verda s3 rm + verda object-storage rm `), // 0 args on a TTY launches the folder browser (drill in, tick files to // delete); an explicit URI runs directly. --agent/non-TTY needs the URI. @@ -113,7 +113,7 @@ func NewCmdRm(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command { // The browser ignores rm's flags; refuse rather than silently drop them // (a user expecting --dryrun to preview would otherwise get real deletes). if opts.Recursive || opts.Dryrun || opts.Yes || len(opts.Include) > 0 || len(opts.Exclude) > 0 { - return cmdutil.UsageErrorf(cmd, "--recursive/--dryrun/--yes/--include/--exclude require an explicit s3://bucket/key; run 'verda s3 rm' with no flags to browse interactively") + return cmdutil.UsageErrorf(cmd, "--recursive/--dryrun/--yes/--include/--exclude require an explicit s3://bucket/key; run 'verda object-storage rm' with no flags to browse interactively") } ctx := cmd.Context() client, err := buildClient(ctx, f, ClientOverrides{}) diff --git a/internal/verda-cli/cmd/s3/rm_browse.go b/internal/verda-cli/cmd/objectstorage/rm_browse.go similarity index 98% rename from internal/verda-cli/cmd/s3/rm_browse.go rename to internal/verda-cli/cmd/objectstorage/rm_browse.go index 9385158..5437496 100644 --- a/internal/verda-cli/cmd/s3/rm_browse.go +++ b/internal/verda-cli/cmd/objectstorage/rm_browse.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "context" @@ -23,7 +23,7 @@ import ( cmdutil "github.com/verda-cloud/verda-cli/internal/verda-cli/cmd/util" ) -// runRmBrowser is the interactive deleter launched by `verda s3 rm` with no +// runRmBrowser is the interactive deleter launched by `verda object-storage rm` with no // argument on a terminal. It shares the download browser's folder navigation // (buckets -> prefixes -> objects, one delimiter level at a time) but each level // offers a multi-select delete instead of download. Esc ascends a level; Ctrl+C diff --git a/internal/verda-cli/cmd/s3/rm_test.go b/internal/verda-cli/cmd/objectstorage/rm_test.go similarity index 99% rename from internal/verda-cli/cmd/s3/rm_test.go rename to internal/verda-cli/cmd/objectstorage/rm_test.go index 8bf06a5..baa24a2 100644 --- a/internal/verda-cli/cmd/s3/rm_test.go +++ b/internal/verda-cli/cmd/objectstorage/rm_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "bytes" diff --git a/internal/verda-cli/cmd/s3/show.go b/internal/verda-cli/cmd/objectstorage/show.go similarity index 91% rename from internal/verda-cli/cmd/s3/show.go rename to internal/verda-cli/cmd/objectstorage/show.go index 55ddf5d..2b86c11 100644 --- a/internal/verda-cli/cmd/s3/show.go +++ b/internal/verda-cli/cmd/objectstorage/show.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "fmt" @@ -38,10 +38,10 @@ func NewCmdShow(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command { `), Example: cmdutil.Examples(` # Show default profile - verda s3 show + verda object-storage show # Show specific profile - verda s3 show --profile staging + verda object-storage show --profile staging `), Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { @@ -66,7 +66,7 @@ func NewCmdShow(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command { _, _ = fmt.Fprintf(ioStreams.Out, "s3_configured: false\n") _, _ = fmt.Fprintln(ioStreams.ErrOut) _, _ = fmt.Fprintf(ioStreams.ErrOut, "No S3 credentials found for profile %q.\n", profile) - _, _ = fmt.Fprintf(ioStreams.ErrOut, "Run 'verda s3 configure' to set up S3 credentials.\n") + _, _ = fmt.Fprintf(ioStreams.ErrOut, "Run 'verda object-storage configure' to set up S3 credentials.\n") return nil //nolint:nilerr // Missing credentials are a valid "not configured" state, not an error. } @@ -88,7 +88,7 @@ func NewCmdShow(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command { missing = append(missing, "endpoint") } _, _ = fmt.Fprintf(ioStreams.ErrOut, "Missing: %s\n", strings.Join(missing, ", ")) - _, _ = fmt.Fprintf(ioStreams.ErrOut, "Run 'verda s3 configure' to complete setup.\n") + _, _ = fmt.Fprintf(ioStreams.ErrOut, "Run 'verda object-storage configure' to complete setup.\n") } return nil diff --git a/internal/verda-cli/cmd/s3/show_test.go b/internal/verda-cli/cmd/objectstorage/show_test.go similarity index 99% rename from internal/verda-cli/cmd/s3/show_test.go rename to internal/verda-cli/cmd/objectstorage/show_test.go index 54134ab..6bba7d4 100644 --- a/internal/verda-cli/cmd/s3/show_test.go +++ b/internal/verda-cli/cmd/objectstorage/show_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "bytes" diff --git a/internal/verda-cli/cmd/s3/sync.go b/internal/verda-cli/cmd/objectstorage/sync.go similarity index 97% rename from internal/verda-cli/cmd/s3/sync.go rename to internal/verda-cli/cmd/objectstorage/sync.go index 8b64a2b..0a49875 100644 --- a/internal/verda-cli/cmd/s3/sync.go +++ b/internal/verda-cli/cmd/objectstorage/sync.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "context" @@ -30,7 +30,7 @@ import ( cmdutil "github.com/verda-cloud/verda-cli/internal/verda-cli/cmd/util" ) -// syncOptions captures the flags accepted by `verda s3 sync`. +// syncOptions captures the flags accepted by `verda object-storage sync`. type syncOptions struct { Delete bool ExactTimestamps bool @@ -64,7 +64,7 @@ type syncPayload struct { Summary syncSummary `json:"summary" yaml:"summary"` } -// NewCmdSync builds the `verda s3 sync` cobra command. +// NewCmdSync builds the `verda object-storage sync` cobra command. func NewCmdSync(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command { opts := &syncOptions{} @@ -90,16 +90,16 @@ func NewCmdSync(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Command { `), Example: cmdutil.Examples(` # Mirror a local directory to S3 - verda s3 sync ./site s3://my-bucket/site/ + verda object-storage sync ./site s3://my-bucket/site/ # Pull a prefix down incrementally - verda s3 sync s3://my-bucket/backups/ ./backups + verda object-storage sync s3://my-bucket/backups/ ./backups # Copy between buckets, mirroring deletions - verda s3 sync s3://src/data/ s3://dst/data/ --delete + verda object-storage sync s3://src/data/ s3://dst/data/ --delete # Only sync .csv files, preview first - verda s3 sync ./data s3://my-bucket/data/ --include "*.csv" --dryrun + verda object-storage sync ./data s3://my-bucket/data/ --include "*.csv" --dryrun `), Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { diff --git a/internal/verda-cli/cmd/s3/sync_test.go b/internal/verda-cli/cmd/objectstorage/sync_test.go similarity index 99% rename from internal/verda-cli/cmd/s3/sync_test.go rename to internal/verda-cli/cmd/objectstorage/sync_test.go index 4921316..1599ee0 100644 --- a/internal/verda-cli/cmd/s3/sync_test.go +++ b/internal/verda-cli/cmd/objectstorage/sync_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "bytes" diff --git a/internal/verda-cli/cmd/s3/transfer.go b/internal/verda-cli/cmd/objectstorage/transfer.go similarity index 99% rename from internal/verda-cli/cmd/s3/transfer.go rename to internal/verda-cli/cmd/objectstorage/transfer.go index a9ef203..4ed1bfb 100644 --- a/internal/verda-cli/cmd/s3/transfer.go +++ b/internal/verda-cli/cmd/objectstorage/transfer.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "context" diff --git a/internal/verda-cli/cmd/s3/transfer_progress.go b/internal/verda-cli/cmd/objectstorage/transfer_progress.go similarity index 99% rename from internal/verda-cli/cmd/s3/transfer_progress.go rename to internal/verda-cli/cmd/objectstorage/transfer_progress.go index 21fa7fa..d5cf80e 100644 --- a/internal/verda-cli/cmd/s3/transfer_progress.go +++ b/internal/verda-cli/cmd/objectstorage/transfer_progress.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "fmt" diff --git a/internal/verda-cli/cmd/s3/transfer_progress_test.go b/internal/verda-cli/cmd/objectstorage/transfer_progress_test.go similarity index 99% rename from internal/verda-cli/cmd/s3/transfer_progress_test.go rename to internal/verda-cli/cmd/objectstorage/transfer_progress_test.go index e27ce64..0b2f7c6 100644 --- a/internal/verda-cli/cmd/s3/transfer_progress_test.go +++ b/internal/verda-cli/cmd/objectstorage/transfer_progress_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "bytes" diff --git a/internal/verda-cli/cmd/s3/tui_interactive_test.go b/internal/verda-cli/cmd/objectstorage/tui_interactive_test.go similarity index 99% rename from internal/verda-cli/cmd/s3/tui_interactive_test.go rename to internal/verda-cli/cmd/objectstorage/tui_interactive_test.go index 7639837..3704a45 100644 --- a/internal/verda-cli/cmd/s3/tui_interactive_test.go +++ b/internal/verda-cli/cmd/objectstorage/tui_interactive_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "bytes" diff --git a/internal/verda-cli/cmd/s3/upload_wizard.go b/internal/verda-cli/cmd/objectstorage/upload_wizard.go similarity index 99% rename from internal/verda-cli/cmd/s3/upload_wizard.go rename to internal/verda-cli/cmd/objectstorage/upload_wizard.go index f72aad5..06b5858 100644 --- a/internal/verda-cli/cmd/s3/upload_wizard.go +++ b/internal/verda-cli/cmd/objectstorage/upload_wizard.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "context" @@ -138,7 +138,7 @@ func confirmAndRunUpload(ctx context.Context, cmd *cobra.Command, f cmdutil.Fact if !strings.HasSuffix(destDisplay, "/") { destDisplay += "/" } - preview := "verda s3 cp " + source + " " + destDisplay + preview := "verda object-storage cp " + source + " " + destDisplay if isDir { preview += " --recursive" } diff --git a/internal/verda-cli/cmd/s3/upload_wizard_test.go b/internal/verda-cli/cmd/objectstorage/upload_wizard_test.go similarity index 99% rename from internal/verda-cli/cmd/s3/upload_wizard_test.go rename to internal/verda-cli/cmd/objectstorage/upload_wizard_test.go index 84c6a5a..2aa12b8 100644 --- a/internal/verda-cli/cmd/s3/upload_wizard_test.go +++ b/internal/verda-cli/cmd/objectstorage/upload_wizard_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "bytes" diff --git a/internal/verda-cli/cmd/s3/uploads_test.go b/internal/verda-cli/cmd/objectstorage/uploads_test.go similarity index 99% rename from internal/verda-cli/cmd/s3/uploads_test.go rename to internal/verda-cli/cmd/objectstorage/uploads_test.go index e20f6e2..9e8a7e6 100644 --- a/internal/verda-cli/cmd/s3/uploads_test.go +++ b/internal/verda-cli/cmd/objectstorage/uploads_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "bytes" diff --git a/internal/verda-cli/cmd/s3/uri.go b/internal/verda-cli/cmd/objectstorage/uri.go similarity index 98% rename from internal/verda-cli/cmd/s3/uri.go rename to internal/verda-cli/cmd/objectstorage/uri.go index d85459f..fec658f 100644 --- a/internal/verda-cli/cmd/s3/uri.go +++ b/internal/verda-cli/cmd/objectstorage/uri.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "errors" diff --git a/internal/verda-cli/cmd/s3/uri_test.go b/internal/verda-cli/cmd/objectstorage/uri_test.go similarity index 98% rename from internal/verda-cli/cmd/s3/uri_test.go rename to internal/verda-cli/cmd/objectstorage/uri_test.go index 52be79b..b2d0a91 100644 --- a/internal/verda-cli/cmd/s3/uri_test.go +++ b/internal/verda-cli/cmd/objectstorage/uri_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import "testing" diff --git a/internal/verda-cli/cmd/s3/wizard.go b/internal/verda-cli/cmd/objectstorage/wizard.go similarity index 99% rename from internal/verda-cli/cmd/s3/wizard.go rename to internal/verda-cli/cmd/objectstorage/wizard.go index ebaf665..29debee 100644 --- a/internal/verda-cli/cmd/s3/wizard.go +++ b/internal/verda-cli/cmd/objectstorage/wizard.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "context" diff --git a/internal/verda-cli/cmd/s3/wizard_test.go b/internal/verda-cli/cmd/objectstorage/wizard_test.go similarity index 99% rename from internal/verda-cli/cmd/s3/wizard_test.go rename to internal/verda-cli/cmd/objectstorage/wizard_test.go index c47b307..a396c24 100644 --- a/internal/verda-cli/cmd/s3/wizard_test.go +++ b/internal/verda-cli/cmd/objectstorage/wizard_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package s3 +package objectstorage import ( "context" diff --git a/internal/verda-cli/cmd/registry/CLAUDE.md b/internal/verda-cli/cmd/registry/CLAUDE.md index 0994e0b..4875eaa 100644 --- a/internal/verda-cli/cmd/registry/CLAUDE.md +++ b/internal/verda-cli/cmd/registry/CLAUDE.md @@ -32,7 +32,7 @@ - `push_view.go` -- Bubbletea model + renderer for the push/copy progress view. `isTerminalFn` swap point. - `push_picker.go` -- Bubbletea model for the interactive daemon-image picker (selectable list + `formatAgo` helper). - `copy.go` -- Copy single ref / `--all-tags` between registries. `sourceKeychainBuilder` / `sourceRegistryBuilder` swap points; worker pool + overwrite guard. `runCopy` (flag path) reads the `--src-auth basic` secret from stdin then calls `runCopyResolved`, the shared post-auth executor; `buildSourceAuth(opts, basicPassword)` takes the password as a string (stdin on the flag path, a prompt in the wizard). - - `copy_wizard.go` -- Interactive `copy` wizard (zero args on a TTY, gated by `copyWizardEligible`). s3-cp-style step-machine: source → access → scope → destination → confirm, Esc=back/Ctrl+C=exit. Collects into `opts` + a prompted password, then calls `runCopyResolved` so the wizard and flag paths share dry-run/overwrite/all-tags/progress behavior. `confirmAndRunCopy` previews the equivalent `verda registry copy …` command before executing. + - `copy_wizard.go` -- Interactive `copy` wizard (zero args on a TTY, gated by `copyWizardEligible`). object-storage cp-style step-machine: source → access → scope → destination → confirm, Esc=back/Ctrl+C=exit. Collects into `opts` + a prompted password, then calls `runCopyResolved` so the wizard and flag paths share dry-run/overwrite/all-tags/progress behavior. `confirmAndRunCopy` previews the equivalent `verda registry copy …` command before executing. - `*_test.go` alongside each file. ## Domain-Specific Logic @@ -57,7 +57,7 @@ Registry credentials are **write-once from the user's side**. The Verda API's `G Registry commands are in `skipCredentialResolution` (see `cmd/cmd.go`), so `Options.Complete()` never runs and the active profile is **not** auto-resolved the way it is for `verda vm`. `resolveProfile(flagProfile)` in `helper.go` replicates the precedence locally: **explicit `--profile` > `VERDA_PROFILE` / `auth.profile` (via `options.ActiveProfile`) > `"default"`**. Every subcommand's `--profile` flag now defaults to `""` (not `defaultProfileName`) so "unspecified" reaches `resolveProfile` and picks up the active profile; `loadCredsFromFactory` and `show`/`configure` all route through it. -This matters because `configure`'s wizard picker already defaults to the active profile (`ActiveProfile`). Before the fix, the read commands hardcoded `"default"`, so a user whose active profile was e.g. `production` configured `production` but `ls`/`tags`/… silently read the stale `default` section — surfacing as a spurious `registry_credential_expired`. The `"default"` final fallback also avoids `LoadRegistryCredentialsForProfile(path, "")` resolving ini.v1's synthetic `DEFAULT` section instead of the user's `[default]`. An explicit `--profile X` always wins (resolution is idempotent). s3 has the same hardcoded-default shape and is a candidate for the same fix. +This matters because `configure`'s wizard picker already defaults to the active profile (`ActiveProfile`). Before the fix, the read commands hardcoded `"default"`, so a user whose active profile was e.g. `production` configured `production` but `ls`/`tags`/… silently read the stale `default` section — surfacing as a spurious `registry_credential_expired`. The `"default"` final fallback also avoids `LoadRegistryCredentialsForProfile(path, "")` resolving ini.v1's synthetic `DEFAULT` section instead of the user's `[default]`. An explicit `--profile X` always wins (resolution is idempotent). object-storage has the same hardcoded-default shape and is a candidate for the same fix. ### ggcr Isolation Discipline @@ -123,7 +123,7 @@ Cloud registries (ECR / GCR / Artifact Registry / ACR / ...) don't need a separa ### `--yes` Implies `--overwrite` (copy) -Matches s3's `rm`/`rb` pattern. Both flags can be set; if either is set, `copy` proceeds through pre-existing destination tags without prompting. In the `runCopy` body we normalize `opts.Yes -> opts.Overwrite` once, so everywhere downstream reads only `Overwrite`. +Matches object-storage's `rm`/`rb` pattern. Both flags can be set; if either is set, `copy` proceeds through pre-existing destination tags without prompting. In the `runCopy` body we normalize `opts.Yes -> opts.Overwrite` once, so everywhere downstream reads only `Overwrite`. ### Overwrite Guard (copy) diff --git a/internal/verda-cli/cmd/registry/README.md b/internal/verda-cli/cmd/registry/README.md index 74752be..137e22c 100644 --- a/internal/verda-cli/cmd/registry/README.md +++ b/internal/verda-cli/cmd/registry/README.md @@ -90,7 +90,7 @@ verda registry copy docker.io/library/nginx --all-tags verda registry copy gcr.io/my-project/app:v1 my-app:prod ``` -On a terminal, running `copy` with **no arguments** launches a wizard that mirrors `s3 cp`'s flow: enter the **source** image (validated), pick **source access** (public via `docker login` / anonymous / username+password), choose **scope** (just this tag / all tags), confirm the **destination** (pre-filled with the synthesized `vccr.io//:`), then review a `Will run: verda registry copy …` preview before it executes. Esc steps back a question; Ctrl+C exits. Scripts / `--agent` / `-o json` must pass `` explicitly. +On a terminal, running `copy` with **no arguments** launches a wizard that mirrors `object-storage cp`'s flow: enter the **source** image (validated), pick **source access** (public via `docker login` / anonymous / username+password), choose **scope** (just this tag / all tags), confirm the **destination** (pre-filled with the synthesized `vccr.io//:`), then review a `Will run: verda registry copy …` preview before it executes. Esc steps back a question; Ctrl+C exits. Scripts / `--agent` / `-o json` must pass `` explicitly. ### 6. Delete a repository or image diff --git a/internal/verda-cli/cmd/registry/client.go b/internal/verda-cli/cmd/registry/client.go index ddd9b23..2d620ac 100644 --- a/internal/verda-cli/cmd/registry/client.go +++ b/internal/verda-cli/cmd/registry/client.go @@ -31,7 +31,7 @@ import ( // Docker Registry v2-compatible endpoint. The concrete implementation // lives in this file (ggcrRegistry) and is swappable via helper.go's // clientBuilder for tests. Keeping all go-containerregistry imports in -// this file mirrors the s3 package's discipline of isolating SDK +// this file mirrors the objectstorage package's discipline of isolating SDK // imports to client.go + errors.go. type Registry interface { // Tags returns tag names for the given repository (e.g. "my-app" or "ns/app"). diff --git a/internal/verda-cli/cmd/registry/configure.go b/internal/verda-cli/cmd/registry/configure.go index e7477bc..dccb82a 100644 --- a/internal/verda-cli/cmd/registry/configure.go +++ b/internal/verda-cli/cmd/registry/configure.go @@ -185,7 +185,7 @@ func runConfigure(cmd *cobra.Command, f cmdutil.Factory, ioStreams cmdutil.IOStr // printConfigureIntro tells the user exactly where the docker-login string // lives in the Verda web UI before the wizard prompts for it. The path is // several clicks deep, so new users otherwise can't find the "Registry -// authentication command" the paste step asks for. Mirrors s3's +// authentication command" the paste step asks for. Mirrors objectstorage's // printConfigureIntro. Goes to ErrOut so stdout stays clean. func printConfigureIntro(ioStreams cmdutil.IOStreams) { w := ioStreams.ErrOut diff --git a/internal/verda-cli/cmd/registry/copy.go b/internal/verda-cli/cmd/registry/copy.go index 39e333a..ba8d3eb 100644 --- a/internal/verda-cli/cmd/registry/copy.go +++ b/internal/verda-cli/cmd/registry/copy.go @@ -235,7 +235,7 @@ func runCopy(cmd *cobra.Command, f cmdutil.Factory, ioStreams cmdutil.IOStreams, // //nolint:gocritic // hugeParam: Ref is an immutable value type; contract uses value receivers uniformly (see refname.go). func runCopyResolved(cmd *cobra.Command, f cmdutil.Factory, ioStreams cmdutil.IOStreams, opts *copyOptions, args []string, creds *options.RegistryCredentials, srcRef Ref, srcAuth authn.Authenticator) error { - // --yes implies --overwrite — matches s3 rm/rb's pattern where --yes + // --yes implies --overwrite — matches object-storage rm/rb's pattern where --yes // means "I've already decided." Keeping the two as separate flags lets // a user say "overwrite yes, but also surface progress" without // suppressing future confirmation prompts unrelated to this action. diff --git a/internal/verda-cli/cmd/registry/copy_wizard.go b/internal/verda-cli/cmd/registry/copy_wizard.go index 3b5e4f0..e4c7f5c 100644 --- a/internal/verda-cli/cmd/registry/copy_wizard.go +++ b/internal/verda-cli/cmd/registry/copy_wizard.go @@ -26,7 +26,7 @@ import ( "github.com/verda-cloud/verda-cli/internal/verda-cli/options" ) -// copy wizard steps. Mirrors s3 cp's runUploadWizard step-machine: each step +// copy wizard steps. Mirrors object-storage cp's runUploadWizard step-machine: each step // prompts, Esc steps back one, Ctrl+C exits, and a final confirm previews the // equivalent command before running the real copy pipeline. const ( @@ -154,7 +154,7 @@ func runCopyWizard(cmd *cobra.Command, f cmdutil.Factory, ioStreams cmdutil.IOSt // classifyWizardNav maps a picker's returned error into back/exit/real outcomes. // Esc (IsPromptBack) steps back; Ctrl+C (IsPromptInterrupt) exits; a non-prompt -// error propagates; nil advances. Mirrors s3 cp's classifyNav. +// error propagates; nil advances. Mirrors object-storage cp's classifyNav. func classifyWizardNav(err error, firstStep bool) (back, exit bool, fatal error) { switch { case err == nil: diff --git a/internal/verda-cli/cmd/registry/delete.go b/internal/verda-cli/cmd/registry/delete.go index 80a36f6..48692bc 100644 --- a/internal/verda-cli/cmd/registry/delete.go +++ b/internal/verda-cli/cmd/registry/delete.go @@ -524,7 +524,7 @@ func runDeleteRepoMenu(ctx context.Context, f cmdutil.Factory, ioStreams cmdutil // runDeleteImagesInteractive lists artifacts in repo and runs a // MultiSelect picker over them. The hint bar (WithMultiSelectShowHints) // advertises the toggle / ctrl+a-select-all / enter keys, matching the -// s3 browser's multi-select affordances. +// object-storage browser's multi-select affordances. // // The confirm step matches the "Delete image" dialog from the web UI: // one row per selected artifact, red warning, yes/no. diff --git a/internal/verda-cli/cmd/registry/format.go b/internal/verda-cli/cmd/registry/format.go index aea224d..9fe5808 100644 --- a/internal/verda-cli/cmd/registry/format.go +++ b/internal/verda-cli/cmd/registry/format.go @@ -87,7 +87,7 @@ func isStructuredFormat(format string) bool { // Harbor's web UI phrasing so the CLI and UI read the same. const untaggedLabel = "" -// Interactive-picker glyphs mirror the s3 browser's iconography so the two +// Interactive-picker glyphs mirror the object-storage browser's iconography so the two // command trees read the same in interactive mode: 📦 a repository, 📄 an // image (artifact). See cmd/s3/browse.go for the originating convention. const ( diff --git a/internal/verda-cli/cmd/registry/wizard.go b/internal/verda-cli/cmd/registry/wizard.go index 3ea1d29..dc8adc6 100644 --- a/internal/verda-cli/cmd/registry/wizard.go +++ b/internal/verda-cli/cmd/registry/wizard.go @@ -30,7 +30,7 @@ import ( // newProfileSentinel is the Choice value for "create a new profile". A NUL // byte can't occur in an INI section name, so it never collides with a real -// profile. Mirrors the s3 wizard's sentinel. +// profile. Mirrors the object-storage wizard's sentinel. const newProfileSentinel = "\x00new-profile" // Credential input modes offered by the wizard, matching the two ways the web @@ -165,7 +165,7 @@ func configureStepSecret(opts *configureOptions) wizard.Step { // registryProfileChoices lists existing credential profiles (each tagged with // whether it already holds registry credentials) plus a trailing "create new" // option. Reading the file fails soft: on any error the user still gets the -// create-new choice. Mirrors the s3 wizard's profileChoices. +// create-new choice. Mirrors the object-storage wizard's profileChoices. func registryProfileChoices(path string) []wizard.Choice { profiles, _ := options.ListProfiles(path) choices := make([]wizard.Choice, 0, len(profiles)+1) diff --git a/internal/verda-cli/options/options.go b/internal/verda-cli/options/options.go index 0825094..9e88ed8 100644 --- a/internal/verda-cli/options/options.go +++ b/internal/verda-cli/options/options.go @@ -239,7 +239,7 @@ func (o *Options) Validate() error { } // ActiveProfile resolves the auth profile name for commands that skip -// Options.Complete() (s3, registry — see skipCredentialResolution in cmd.go), +// Options.Complete() (object-storage, registry — see skipCredentialResolution in cmd.go), // honoring the same precedence as full resolution: explicit flag > VERDA_PROFILE // env > config file (auth.profile, set by `verda auth use`). Returns "" when // none is set so the caller can apply its own default. Without this, those