Skip to content

docs(cli): sync namespace table and auth precedence with the CLI#54

Merged
acoshift merged 1 commit into
mainfrom
docs-cli-table-sync
Jun 28, 2026
Merged

docs(cli): sync namespace table and auth precedence with the CLI#54
acoshift merged 1 commit into
mainfrom
docs-cli-table-sync

Conversation

@acoshift

Copy link
Copy Markdown
Member

What

The CLI reference in content/automation/cli.md had drifted from the actual command surface. The source of truth is the commands registry in the deploys repo (internal/runner/help.go), which feeds deploys help, deploys <group> help, and every subcommand's -h banner. This syncs the doc back to it.

Namespace table

Namespace Fix
me add permissions, generate-token, list-tokens, revoke-token
role add permissions
deployment drop the non-existent errors; show set (the user-facing listing) instead of the hidden set image leaf; add status, logs, extend-ttl
disk add metrics
dropbox add upload-url
auth new rowlogin, logout, status, list, switch, token
error new rowlist, get, update, report (alias errors)
cache new rowget, list, set, delete, metrics
notification new rowcreate, get, list, update, delete, test, deliveries, pull

All 25 namespaces in help.go are now present and match exactly (names, aliases, non-hidden subcommands).

Authenticate precedence

The section claimed "three ways" in the order DEPLOYS_TOKEN → basic → ADC. The real resolution in deploys' main.go (newAPIClient) is four sources, in this order:

  1. DEPLOYS_AUTH_USER + DEPLOYS_AUTH_PASS (basic)
  2. DEPLOYS_TOKEN (empty treated as unset)
  3. a stored login (deploys login)
  4. Google ADC

Fixed the count and order, and documented the previously-missing interactive deploys login flow (which the new auth table row also surfaces).

Why

Users rely on this page as the CLI reference; the table advertised a command that doesn't exist (deployment errors), omitted several shipped namespaces (error, cache, notification, auth) and subcommands, and stated the auth precedence incorrectly.

Verification

  • Cross-checked every row against internal/runner/help.go in the deploys repo (the registry is documented there as the single source of truth for the help surface).
  • Auth precedence verified against main.go:newAPIClient.
  • Content-only change to one Markdown file; no shortcodes or links altered.

Follow-up (not in this PR)

The Authenticate section now mentions deploys login, but there is no dedicated walkthrough of the interactive browser login / multi-account flow anywhere in the docs. Worth a separate page.

The CLI reference in automation/cli.md had drifted from the actual command
surface (the commands registry in deploys' internal/runner/help.go, which
feeds 'deploys help'):

- me: add permissions, generate-token, list-tokens, revoke-token
- role: add permissions
- deployment: drop the non-existent 'errors'; show 'set' (the user-facing
  listing) instead of the hidden 'set image' leaf; add status, logs, extend-ttl
- disk: add metrics
- dropbox: add upload-url
- add the missing auth, error, cache, and notification namespaces

Also fix the Authenticate precedence, which is verified against main.go's
newAPIClient: it is four sources in the order basic auth -> DEPLOYS_TOKEN ->
stored login -> ADC, not the three (token -> basic -> ADC) documented. This
adds the previously-undocumented interactive 'deploys login' flow.
@deploys-app deploys-app Bot temporarily deployed to pr-54 June 28, 2026 14:46 Destroyed
@deploys-app

deploys-app Bot commented Jun 28, 2026

Copy link
Copy Markdown

Preview deleted (PR closed).

@acoshift acoshift merged commit afb01a9 into main Jun 28, 2026
1 check passed
@acoshift acoshift deleted the docs-cli-table-sync branch June 28, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant