microsoft / microsoft/aspire

Add -InstallMode support to get-aspire-cli release installer scripts

Open
#17,763 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**

`eng/scripts/get-aspire-cli-pr.{sh,ps1}` supports `-InstallMode Archive | Tool | WinGet | Homebrew` (and with #17761, `Npm`). The public release installer `eng/scripts/get-aspire-cli.{sh,ps1}` has no install-mode parameter at all — it's hardcoded to the archive download path. Users who want a non-archive install have to know about the route's native tool (`dotnet tool install -g`, `winget install`, `brew install`, `npm install -g`) and run it themselves; there's no unified release-installer command.

We should bring `--install-mode` to the release installer with the same set of modes the PR installer supports, so the documented "one-liner to install Aspire" can also be the one-liner that picks the user's preferred route.

**Background**

The release installer is the canonical install script linked from the get-started docs (`https://aspire.dev/...`, README). Today it always downloads the latest signed archive from the GitHub release and extracts it under `~/.aspire/bin/`. Users who'd prefer to install via the dotnet global tool, WinGet, Homebrew, or (with #17297) npm have to abandon the install script and run the route-native command directly. That fragments the install experience and means the README needs N install snippets instead of one.

The PR installer already does mode dispatch (`eng/scripts/get-aspire-cli-pr.ps1:152-157`), so the dispatch pattern is established. The release installer would use the same `-InstallMode` parameter with the same value set.

**Acceptance criteria**

- `get-aspire-cli.{sh,ps1} -InstallMode Archive | Tool | WinGet | Homebrew | Npm` selects the install route.
- Default remains `Archive` (no behavior change for existing users / docs).
- Each mode invokes the matching native tool command for the latest released version, with the same host-platform / `--Architecture` / `--OS` / `--Force` / `--InstallPath` parity rules the PR installer already enforces.
- The release docs and README get a section showing all the modes once #17297 ships npm and this lands.

**Out of scope**

- Changing how the release artifacts are produced or signed (already handled by the release pipeline).
- Auto-selecting a "best" install mode based on host environment (e.g., prefer `Homebrew` on macOS) — that's a separate UX question. This issue is just about making the script accept the user's choice.

**Related**

- #17761 — Add `-InstallMode Npm` to the PR installer (`get-aspire-cli-pr`). Should land first so the dispatch pattern for npm is established; this issue then ports the same code path to the release installer.

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.