docs(cli): sync namespace table and auth precedence with the CLI#54
Merged
Conversation
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.
|
Preview deleted (PR closed). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The CLI reference in
content/automation/cli.mdhad drifted from the actual command surface. The source of truth is thecommandsregistry in thedeploysrepo (internal/runner/help.go), which feedsdeploys help,deploys <group> help, and every subcommand's-hbanner. This syncs the doc back to it.Namespace table
mepermissions,generate-token,list-tokens,revoke-tokenrolepermissionsdeploymenterrors; showset(the user-facing listing) instead of the hiddenset imageleaf; addstatus,logs,extend-ttldiskmetricsdropboxupload-urlauthlogin,logout,status,list,switch,tokenerrorlist,get,update,report(aliaserrors)cacheget,list,set,delete,metricsnotificationcreate,get,list,update,delete,test,deliveries,pullAll 25 namespaces in
help.goare 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 indeploys'main.go(newAPIClient) is four sources, in this order:DEPLOYS_AUTH_USER+DEPLOYS_AUTH_PASS(basic)DEPLOYS_TOKEN(empty treated as unset)deploys login)Fixed the count and order, and documented the previously-missing interactive
deploys loginflow (which the newauthtable 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
internal/runner/help.goin thedeploysrepo (the registry is documented there as the single source of truth for the help surface).main.go:newAPIClient.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.