Skip to content

Add JSON help command manifest#296

Merged
AndreyVMarkelov merged 1 commit into
masterfrom
json/help-command-manifest
Jun 26, 2026
Merged

Add JSON help command manifest#296
AndreyVMarkelov merged 1 commit into
masterfrom
json/help-command-manifest

Conversation

@AndreyVMarkelov

@AndreyVMarkelov AndreyVMarkelov commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds structured JSON output for --help --output=json and help <cmd> --output=json, returning a command manifest with path, flags, auth modes, destructive level, and structured output support.
  • Skips auth for help requests so manifests are available without credentials.
  • Tags rm as destructive_level: delete and team add-member/team remove-member as destructive_level: admin.
  • Provides shell tab-completions for help <subcommand>.
  • Preserves text help behavior when --output=json is absent.
  • Adds help to the JSON contract schema with golden fixtures.

Test plan

  • go test ./... -count=1 passes (13 JSON help tests + contract audits)
  • golangci-lint run ./... clean
  • ./dbxcli ls --help --output=json produces valid manifest
  • ./dbxcli --help --output=json lists all 39 public commands
  • ./dbxcli --help still prints text help
  • CI passes

Enable structured JSON output for help via `--help --output=json` and
`help <cmd> --output=json`. Each command in the subtree is described with
path, flags, auth modes, destructive level, and structured output support.
The help command skips auth, provides shell completions, and preserves
text help behavior when --output=json is absent.
@AndreyVMarkelov AndreyVMarkelov merged commit 919bdc5 into master Jun 26, 2026
8 checks passed
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