Skip to content

Add AI-generated command reference#282

Open
duanemay wants to merge 3 commits intomasterfrom
command-ref
Open

Add AI-generated command reference#282
duanemay wants to merge 3 commits intomasterfrom
command-ref

Conversation

@duanemay
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings March 27, 2026 21:52
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds end-user documentation for the uaa CLI, including a command reference and a uaac→uaa migration guide, and updates the CLI help footer issue URL.

Changes:

  • Add a new docs-based command reference index plus per-command documentation pages.
  • Add a “Migrating from uaac” guide with side-by-side command mappings and notes.
  • Update the CLI root help text to point to the current GitHub issues URL.

Reviewed changes

Copilot reviewed 37 out of 37 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
help/root.go Updates “Feedback” text to the current issue tracker URL.
README.md Links to the new command reference and migration guide.
docs/commands.md Adds a top-level command index linking to per-command docs.
docs/migrating-from-uaac.md Adds uaac→uaa migration guide and mapping table.
docs/commands/activate-user.md Adds documentation for activate-user.
docs/commands/add-member.md Adds documentation for add-member.
docs/commands/context.md Adds documentation for context.
docs/commands/create-client.md Adds documentation for create-client.
docs/commands/create-group.md Adds documentation for create-group.
docs/commands/create-user.md Adds documentation for create-user.
docs/commands/curl.md Adds documentation for curl.
docs/commands/deactivate-user.md Adds documentation for deactivate-user.
docs/commands/delete-client.md Adds documentation for delete-client.
docs/commands/delete-user.md Adds documentation for delete-user.
docs/commands/get-authcode-token.md Adds documentation for get-authcode-token.
docs/commands/get-client-credentials-token.md Adds documentation for get-client-credentials-token.
docs/commands/get-client.md Adds documentation for get-client.
docs/commands/get-group.md Adds documentation for get-group.
docs/commands/get-implicit-token.md Adds documentation for get-implicit-token.
docs/commands/get-password-token.md Adds documentation for get-password-token.
docs/commands/get-token-key.md Adds documentation for get-token-key.
docs/commands/get-token-keys.md Adds documentation for get-token-keys.
docs/commands/get-user.md Adds documentation for get-user.
docs/commands/info.md Adds documentation for info.
docs/commands/list-clients.md Adds documentation for list-clients.
docs/commands/list-group-mappings.md Adds documentation for list-group-mappings.
docs/commands/list-groups.md Adds documentation for list-groups.
docs/commands/list-users.md Adds documentation for list-users.
docs/commands/map-group.md Adds documentation for map-group.
docs/commands/refresh-token.md Adds documentation for refresh-token.
docs/commands/remove-member.md Adds documentation for remove-member.
docs/commands/set-client-secret.md Adds documentation for set-client-secret.
docs/commands/target.md Adds documentation for target.
docs/commands/unmap-group.md Adds documentation for unmap-group.
docs/commands/update-client.md Adds documentation for update-client.
docs/commands/userinfo.md Adds documentation for userinfo (aka me).
docs/commands/version.md Adds documentation for version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 37 out of 37 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

# Migrating from uaac

This guide helps users of the Ruby-based [cf-uaac](https://github.com/cloudfoundry/cf-uaac) (`uaac`) CLI transition to the Go-based `uaa` CLI.
See the [UAA-CLI Command Reference](docs/commands.md) for the full list of `uaa` commands and their options.
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link to the command reference is using an incorrect relative path. Since this file lives in docs/, docs/commands.md will resolve to docs/docs/commands.md and break; it should link to commands.md (or ./commands.md).

Copilot uses AI. Check for mistakes.
Comment on lines +10 to +12
| **Command style** | Hierarchical topic/verb: `uaac token client get` | Flat VERB-NOUN with hyphens: `uaa get-client-credentials-token` |
| **Output format** | Human-readable text | Machine-parseable JSON by default |
| **SSL validation** | `uaac target URL --skip-ssl-validation` | `uaa target URL --skip-ssl-validation` |
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The table claims the uaa CLI output is "Machine-parseable JSON by default", but several commands print human-readable status messages to stdout in addition to JSON (e.g., create-client logs a success line before printing JSON, and the logger routes both Info and JSON/Robots output to stdout). This makes the output not reliably machine-parseable as a single JSON document; consider rewording to reflect mixed human + JSON output or document how to obtain JSON-only output if supported.

Copilot uses AI. Check for mistakes.
Comment on lines +140 to +141
For uaac commands that have no direct equivalent, `uaa curl` provides authenticated access to any UAA API endpoint. First obtain a token, then use `curl` with the active context's credentials:

Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence says to "use curl" after obtaining a token, but the intended fallback command appears to be uaa curl (and the example below uses uaa curl). Using plain curl would not automatically include the CLI context token.

Copilot uses AI. Check for mistakes.
Comment on lines +34 to +36
uaa get-password-token cf -s "" -u admin -p admin-secret
uaa context # note the refresh_token
uaa refresh-token -s ""
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example uses uaa refresh-token -s "", but the refresh-token command currently validates --client_secret as non-empty and will error when it is an empty string. Update the example to use a real client secret (or adjust the docs to explain that empty secrets are not supported for refresh).

Suggested change
uaa get-password-token cf -s "" -u admin -p admin-secret
uaa context # note the refresh_token
uaa refresh-token -s ""
uaa get-password-token cf -s cf-client-secret -u admin -p admin-secret
uaa context # note the refresh_token
uaa refresh-token -s cf-client-secret

Copilot uses AI. Check for mistakes.
Comment on lines +31 to +38
uaa target https://uaa.example.com
uaa get-client-credentials-token admin -s admin-secret
uaa create-client my-app \
--authorized_grant_types authorization_code \
--redirect_uri http://localhost:9090/** \
--scope openid,cloud_controller.read
uaa get-authcode-token my-app -s my-secret --port 9090
uaa context
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the example, the client is created without setting a client_secret, but get-authcode-token requires a non-empty -s/--client_secret and the secret must match the client registration. As written, the example will not work; include the same secret when creating the client and when running get-authcode-token.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants