Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ The following arguments are available:

The name of the integration to add (for example: redis, postgres).

If a partial name or invalid name is provided, the CLI searches NuGet for approximate matches and prints them in the terminal for the user to select. If no results are found, all packages are listed.
Exact friendly names or full package IDs (for example, `redis` or `Aspire.Hosting.Redis`) skip the package-selection prompt. In interactive mode, you might still be prompted to choose a version if multiple versions are available. Partial or misspelled names are handled differently depending on the mode:

- **Interactive mode** (default): If the name doesn't exactly match, the CLI searches NuGet for approximate matches and prompts you to select from the results before adding. This prompt is also shown when only a single fuzzy or no-match fallback candidate is found, so a package is never silently added without your confirmation.
- **Non-interactive mode** (`--non-interactive`): The command fails immediately if the name does not exactly match a friendly name or package ID. Use the exact name or full package ID to avoid errors.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Phase B critical finding — documented error is not reproducible

A blind reader running this exact example today will not see the documented error. Tested on the latest publicly-installable Aspire CLIs:

CLI aspire add kube --non-interactive
staging quality: 13.4.0+11bea2eb9 ❌ silently adds Aspire.Hosting.Kubernetes
dev quality: 13.5.0-preview.1.26280.2+afbc0b96b8 ❌ silently adds Aspire.Hosting.Kubernetes

Even aspire add nonexistentpackagexyz --non-interactive silently picks Aspire.Hosting.AgentFramework.DevUI after printing "No packages matched your search term … Showing all available packages" — exactly the silent auto-pick PR #17728 is meant to prevent.

Phase A confirms release/13.4 source (AddCommand.cs:186 + NonInteractiveRequiresExactPackageMatch resource) carries the guard, so this is a release-timing issue: please verify a published 13.4.x CLI build that actually enforces this guard before merging, or add an "Available in X.Y.Z and later" note. See the full Phase B report on the review for the complete reproduction.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Deferring this to a human because the release/13.4 source at microsoft/aspire@2574ef5 contains the non-interactive exact-match guard in src/Aspire.Cli/Commands/AddCommand.cs:186-191 and the corresponding error string in src/Aspire.Cli/Resources/AddCommandStrings.resx:226-228, but the published builds cited in this thread do not exhibit that behavior. I cannot verify the first published 13.4.x build containing the guard from the source branch alone, so a maintainer should decide whether to hold the PR for the build or add a version-specific availability note.


## Options

Expand Down Expand Up @@ -85,3 +88,9 @@ The following options are available:
```bash title="Aspire CLI"
aspire add redis --apphost './apphost.mts'
```

- Add the **kubernetes** integration in a CI script (non-interactive mode requires the exact friendly name or package ID; partial names such as `kube` produce an error):

```bash title="Aspire CLI"
aspire add kubernetes --non-interactive
```
Loading