Skip to content

CLI: Grouped help, command renames, and ergonomics cleanup#14599

Merged
JamesNK merged 38 commits intorelease/13.2from
maleger/cli-grouped-help
Feb 24, 2026
Merged

CLI: Grouped help, command renames, and ergonomics cleanup#14599
JamesNK merged 38 commits intorelease/13.2from
maleger/cli-grouped-help

Conversation

@maddymontaquila
Copy link
Copy Markdown
Contributor

@maddymontaquila maddymontaquila commented Feb 20, 2026

Summary

Overhauls the Aspire CLI user experience before the 13.2 release by reorganizing commands into logical groups, renaming commands for better discoverability, standardizing options, and cleaning up descriptions.

Grouped Help Output

Replaces the flat alphabetical command list with organized groups:

  • App Commands — new, init, add, update, run, stop, ps
  • Resource Management — start, stop, restart, wait, command
  • Monitoring — describe, logs, otel
  • Deployment — publish, deploy, do
  • Tools & Configuration — config, cache, doctor, docs, agent

Each command declares its own group via BaseCommand.HelpGroup/HelpGroupOrder virtual properties, so the help writer dynamically reads groups from commands rather than maintaining a static array. A catch-all "Other Commands" section automatically shows any future commands that haven't been placed in a group, preventing silent omission.

GroupedHelpWriter is now testable — it accepts a TextWriter and maxWidth parameter instead of reading from Console directly, and GroupedHelpAction takes IAnsiConsole from DI.

Command Renames

Before After Rationale
aspire resources aspire describe kubectl-style, more intuitive for showing resource details
aspire telemetry aspire otel Clarifies this is OpenTelemetry-specific, not general telemetry
  • resources is preserved as a backward-compatible alias on describe (shipped in 13.1)
  • telemetry alias removed (never shipped)
  • setup remains a separate hidden command (not folded into doctor)
  • ResourcesCommand renamed to DescribeCommand (source file, test files, resource strings)
  • ResourcesCommandStrings renamed to DescribeCommandStrings (resx, Designer.cs, 13 xlf files)

Option Standardization

  • --watch--follow/-f on describe command — matches logs --follow and docker/kubectl conventions
  • --log-level/-l — legacy --debug-level/-v removed (never shipped)
  • -v now works for --version — standard CLI convention
  • Removed conflicting short aliases: -v from subcommand --version (add/new/init), -l from --language (new/init) — these conflicted with the global -v/-l options
  • Standardized --format descriptions — all commands now use "Output format (Table or Json)."
  • Hidden feature-gated commands (sdk) from help to avoid confusing users
  • --non-interactive description moved from hardcoded string to resource file (RootCommandStrings.resx + 13 xlf files)

Other Improvements

  • Word-wrapping for long descriptions (aligned continuation lines)
  • Argument syntax display (e.g., start <resource>, add [<integration>])
  • Usage line matches gh-style: aspire <command> [options]
  • All command descriptions cleaned up for consistency (lowercase "apphost", standardized verb forms, no redundant "Aspire" prefix)
  • Fixed stale command name references in eng/scripts, agent applicators, and docs

Tests

  • ✅ All 1304 CLI unit tests pass
  • ✅ E2E tests updated to use new command names
  • ✅ New test: AllVisibleCommands_HaveHelpGroup — ensures no command is missing a group
  • ✅ New test: GroupedHelp_ContainsAllVisibleCommands — ensures grouped help output includes every visible command
  • ✅ Error messages reference aspire setup --force (not doctor)
  • ✅ Spec docs updated (bundle.md)
  • ✅ eng/scripts/README.md updated

aspire.dev doc updates

Doc updates for aspire.dev tracked in:

  • (see linked issues below)

maddymontaquila and others added 24 commits February 20, 2026 14:46
Organizes CLI commands into logical groups in the help output:
- App Commands: new, init, add, update, run, stop, start
- Resource Management: run, stop, start, restart, command, wait, ps, resources, logs, telemetry
- Deployment: publish, deploy, do
- Tools & Configuration: config, cache, doctor, docs, agent, setup

Commands that span concerns (run, stop, start) appear in multiple groups.
Subcommand help (e.g. 'aspire run --help') continues to use default rendering.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Commands now display their argument signatures (e.g., 'start <resource>',
'add [<integration>]', 'command <resource> <command>') derived from the
actual Command.Arguments definitions.

Cross-listed commands use context-sensitive overrides: 'stop' and 'start'
appear without arguments in App Commands (app-level) but show their
resource argument in Resource Management.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
'start' requires a resource name argument, so it only belongs in
Resource Management.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Descriptions that exceed the terminal width now wrap to the next line
with proper indentation aligned to the description column. Applied to
both command entries and options.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Frees up -v for --version (the conventional meaning). The old flags
--debug-level and -v are still accepted in the early arg parser for
backward compatibility.

Also fixes option label rendering to include the primary Name when
it is not in the Aliases collection.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ps lists running apphosts (app-level), not individual resources.
-v now works as shorthand for --version, matching CLI conventions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- new: 'Create a new app from an Aspire starter template.'
- init: 'Initialize Aspire in an existing codebase.'
- add: lowercase 'apphost', drop redundant 'Aspire'
- publish: fix verb tense 'Generate' not 'Generates', drop 'Aspire'
- deploy: shorter phrasing, drop 'Aspire'
- run/ps/resources/logs/telemetry: drop redundant 'Aspire' prefix
- Standardize on lowercase 'apphost' across all descriptions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Renames the 'resources' command to 'status' (with 'resources' kept as
an alias for backward compatibility). The description now reads
'Show status of resources in a running apphost.'

Splits the former Resource Management group into:
- Resource Management: start, stop, restart, wait, command
- Monitoring: status, logs, telemetry

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- 'describe' (kubectl-style) replaces 'status'/'resources' for viewing
  resource details. Both old names kept as aliases.
- 'otel' replaces 'telemetry' to clarify this is OpenTelemetry-specific
  data. Old name kept as alias.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
All commands that support --format now use 'Output format (Table or Json).'
as their description string. RunCommand adds 'Only valid with --detach.'

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
New commands that aren't added to a group in s_groups will automatically
appear under 'Other Commands:' instead of silently disappearing from help.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Doctor now auto-extracts the embedded bundle (when running from a
bundled CLI binary) before running environment checks. The setup
command is hidden but preserved for backward compatibility.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
These commands are behind feature flags and not user-facing.
Marking them Hidden prevents them from appearing in the
'Other Commands' catch-all section.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Both describe and logs now use --follow/-f for continuous streaming,
matching docker/kubectl conventions. Updated description to be cleaner.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Drop -v from --version on add/new/init (conflicts with root -v for
CLI version). Drop -l from --language on new/init (conflicts with
global -l for --log-level). These commands will be redesigned later.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Tests: 'resources' -> 'describe', '--watch' -> '--follow'
- Docs: 'aspire telemetry' -> 'aspire otel', 'aspire resources' -> 'aspire describe',
  'aspire setup' -> 'aspire doctor', '--watch' -> '--follow'
- Error messages: 'aspire setup --force' -> 'aspire doctor'
- All 1297 CLI tests pass

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 20, 2026 21:42
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 20, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14599

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 14599"

- Remove never-shipped legacy aliases (--debug-level, telemetry command)
- Rename ResourcesCommand to DescribeCommand (keep resources alias)
- Make GroupedHelpWriter testable via IAnsiConsole and maxWidth param
- Add HelpGroup/HelpGroupOrder to BaseCommand; commands declare own group
- Rewrite GroupedHelpWriter to dynamically read groups from commands
- Revert setup->doctor fold-in; keep setup hidden but functional
- Move NonInteractiveOption description to resource files
- Fix stale command name references in scripts, agents, and docs
- Add tests for help group coverage and grouped help output

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@JamesNK JamesNK force-pushed the maleger/cli-grouped-help branch from ec25cb3 to f15b0cd Compare February 24, 2026 05:54
Co-authored-by: David Fowler <davidfowl@gmail.com>
Co-authored-by: David Fowler <davidfowl@gmail.com>
@JamesNK JamesNK enabled auto-merge (squash) February 24, 2026 06:08
@JamesNK JamesNK merged commit 04a0245 into release/13.2 Feb 24, 2026
680 of 685 checks passed
@JamesNK JamesNK deleted the maleger/cli-grouped-help branch February 24, 2026 07:00
@dotnet-policy-service dotnet-policy-service bot added this to the 13.2 milestone Feb 24, 2026
Copilot AI pushed a commit that referenced this pull request Mar 10, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: David Fowler <davidfowl@gmail.com>
Co-authored-by: James Newton-King <james@newtonking.com>
@github-actions github-actions bot locked and limited conversation to collaborators Mar 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants