Skip to content

Adding descriptions to all args/options in CLI. - #8544

Merged
Mitch Denny (mitchdenny) merged 5 commits into
mainfrom
mitchdenny/improve-cli-help
Apr 4, 2025
Merged

Adding descriptions to all args/options in CLI.#8544
Mitch Denny (mitchdenny) merged 5 commits into
mainfrom
mitchdenny/improve-cli-help

Conversation

@mitchdenny

@mitchdennyMitch Denny (mitchdenny) commented Apr 4, 2025

Copy link
Copy Markdown
Member

CLI help text pass.

aspire --help

Description:
The Aspire CLI can be used to create, run, and publish Aspire-based applications.
Usage:
aspire [command] [options]
Options:
-?, -h, --help Show help and usage information
--version Show version information
-d, --debug Enable debug logging to the console.
-w, --wait-for-debugger Wait for a debugger to attach before executing the command. [default: False]
Commands:
new <template> Create a new Aspire sample project.
run Run an Aspire app host in development mode.
add <resource> Add an integration to the Aspire project.
publish Generates deployment artifacts for an Aspire app host project.

aspire new --help

Description:
Create a new Aspire sample project.
Usage:
aspire new [<template>] [options]
Arguments:
<template> The name of the project template to use (e.g. aspire-starter, aspire).
Options:
-n, --name The name of the project to create.
-o, --output The output path for the project.
-s, --source The NuGet source to use for the project templates.
-v, --version The version of the project templates to use.
-?, -h, --help Show help and usage information
-d, --debug Enable debug logging to the console.
-w, --wait-for-debugger Wait for a debugger to attach before executing the command. [default: False]

aspire run --help

Description:
Run an Aspire app host in development mode.
Usage:
aspire run [options]
Options:
--project The path to the Aspire app host project file.
-w, --watch Start .NET project resources in watch mode.
-?, -h, --help Show help and usage information
-d, --debug Enable debug logging to the console.
-w, --wait-for-debugger Wait for a debugger to attach before executing the command. [default: False]

aspire add --help

Description:
Add an integration to the Aspire project.
Usage:
aspire add [<resource>] [options]
Arguments:
<resource> The name of the integration or resource to add (e.g. redis, postgres).
Options:
--project The path to the project file to add the integration to.
-v, --version The version of the integration to add.
--prerelease Include pre-release versions of the integration when searching.
-s, --source The NuGet source to use for the integration.
-?, -h, --help Show help and usage information
-d, --debug Enable debug logging to the console.
-w, --wait-for-debugger Wait for a debugger to attach before executing the command. [default: False]

aspire publish --help

Description:
Generates deployment artifacts for an Aspire app host project.
Usage:
aspire publish [options]
Options:
--project The path to the Aspire app host project file.
-p, --publisher The name of the publisher to use.
-o, --output-path The output path for the generated artifacts. [default: /workspaces/aspire/src/Aspire.Cli]
-?, -h, --help Show help and usage information
-d, --debug Enable debug logging to the console.
-w, --wait-for-debugger Wait for a debugger to attach before executing the command. [default: False]

CopilotAI review requested due to automatic review settings April 4, 2025 03:36

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Comments suppressed due to low confidence (3)

src/Aspire.Cli/Commands/RunCommand.cs:33

  • The short alias '-w' for the '--watch' option may conflict with the '-w' alias used elsewhere. Consider using a unique alias for the watch option to avoid ambiguity.
watchOption.Description = "Start .NET project resources in watch mode.";

src/Aspire.Cli/Commands/RootCommand.cs:26

  • The short alias '-w' for the '--wait-for-debugger' option in the root command may lead to conflicts with other commands using '-w'. Verify that the alias is unique within the command context.
waitForDebuggerOption.Description = "Wait for a debugger to attach before executing the command.";

src/Aspire.Cli/Commands/PublishCommand.cs:35

  • [nitpick] Using Path.Combine with a single argument returns that argument unchanged, which could be simplified by directly specifying Environment.CurrentDirectory. This change would improve clarity of the default output path.
outputPath.DefaultValueFactory = (result) => Path.Combine(Environment.CurrentDirectory);

Comment threadsrc/Aspire.Cli/Commands/RunCommand.cs Outdated
Co-authored-by: David Fowler <davidfowl@gmail.com>
@mitchdenny
Mitch Denny (mitchdenny) enabled auto-merge (squash) April 4, 2025 06:28
@mitchdenny

Copy link
Copy Markdown
MemberAuthor

/backport to release/9.2

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/9.2: https://github.com/dotnet/aspire/actions/runs/14259414548

@github-actions

Copy link
Copy Markdown
Contributor

Mitch Denny (@mitchdenny) backporting to "release/9.2" failed, the patch most likely resulted in conflicts:

$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Adding descriptions to all args/options in CLI.
Using index info to reconstruct a base tree...
M	src/Aspire.Cli/Commands/NewCommand.cs
M	src/Aspire.Cli/Commands/RunCommand.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Aspire.Cli/Commands/RunCommand.cs
CONFLICT (content): Merge conflict in src/Aspire.Cli/Commands/RunCommand.cs
Auto-merging src/Aspire.Cli/Commands/NewCommand.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Adding descriptions to all args/options in CLI.
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@mitchdenny
Mitch Denny (mitchdenny) deleted the mitchdenny/improve-cli-help branch April 4, 2025 06:42
@mitchdenny

Copy link
Copy Markdown
MemberAuthor

/backport to release/9.2

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/9.2: https://github.com/dotnet/aspire/actions/runs/14260146125

@github-actions

Copy link
Copy Markdown
Contributor

Mitch Denny (@mitchdenny) backporting to "release/9.2" failed, the patch most likely resulted in conflicts:

$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Adding descriptions to all args/options in CLI.
Using index info to reconstruct a base tree...
M	src/Aspire.Cli/Commands/NewCommand.cs
M	src/Aspire.Cli/Commands/RunCommand.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Aspire.Cli/Commands/RunCommand.cs
CONFLICT (content): Merge conflict in src/Aspire.Cli/Commands/RunCommand.cs
Auto-merging src/Aspire.Cli/Commands/NewCommand.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Adding descriptions to all args/options in CLI.
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

Mitch Denny (mitchdenny) added a commit that referenced this pull request Apr 4, 2025
* Adding descriptions to all args/options in CLI.
* Revert project arg to option.
* PR feedback.
* Rename resource to integration.
* Update src/Aspire.Cli/Commands/RunCommand.cs
Co-authored-by: David Fowler <davidfowl@gmail.com>
---------
Co-authored-by: David Fowler <davidfowl@gmail.com>
Mitch Denny (mitchdenny) added a commit that referenced this pull request Apr 4, 2025
* Adding descriptions to all args/options in CLI.
* Revert project arg to option.
* PR feedback.
* Rename resource to integration.
* Update src/Aspire.Cli/Commands/RunCommand.cs
Co-authored-by: David Fowler <davidfowl@gmail.com>
---------
Co-authored-by: David Fowler <davidfowl@gmail.com>
Dan Moseley (danmoseley) pushed a commit that referenced this pull request Apr 4, 2025
* Adding descriptions to all args/options in CLI.
* Revert project arg to option.
* PR feedback.
* Rename resource to integration.
* Update src/Aspire.Cli/Commands/RunCommand.cs
---------
Co-authored-by: David Fowler <davidfowl@gmail.com>
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
@github-actionsgithub-actionsBot locked and limited conversation to collaborators May 4, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@mitchdenny@davidfowl@adamint