microsoft / microsoft/aspire

CLI: Review which commands should display update notifications

Open
#17,374 1 comment 0 reactions 0 assignees View on GitHub
area-cli triage:bot-seen
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

## Summary

After #17350 changed update notifications to opt-in, we should review which commands display the notification and establish a clear rule for when it's appropriate.

## Current state

Commands that currently opt in to `UpdateNotificationsEnabled`:

| Command | Purpose |
|---------|---------|
| AddCommand | Add integrations to a project |
| DashboardRunCommand | Run the Aspire dashboard |
| InitCommand | Initialize an Aspire project |
| LsCommand | List Aspire projects |
| NewCommand / TemplateCommand | Create a new Aspire project |
| PipelineCommandBase (Deploy/Destroy/Do/Publish) | Deploy or publish |
| RestoreCommand | Restore project dependencies |
| RunCommand (non-detach) | Run an AppHost interactively |
| SetupCommand | Set up the Aspire layout |
| StartCommand | Start an AppHost in the background |
| StopCommand | Stop a running AppHost |

Commands that were removed from opt-in during review:
- DescribeCommand, ExportCommand, LogsCommand, PsCommand, ResourceCommand, WaitCommand

## Proposed rule

> **Update notifications should only be displayed for project-lifecycle commands** — commands that create, configure, build, run, or deploy an AppHost. Commands that interact with individual resources within a running AppHost, produce machine-readable output, or are quick utilities should NOT display update notifications.

Rationale:
- Project-lifecycle commands (new, init, run, start, deploy) are natural moments for users to learn about updates
- Resource-interaction commands (logs, ps, describe, wait, resource start/stop) are executed frequently during development and the notification becomes noise
- Machine-readable/streaming commands should never show notifications as they pollute structured output

## Action items

- [ ] Confirm the proposed rule matches team intent
- [ ] Evaluate whether `LsCommand` and `StopCommand` should still show notifications (they're quick commands)
- [ ] Add the rule to agent instructions so future commands follow the convention

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.