Skip to content

Add a walkthrough to install aspire CLI#12574

Closed
adamint wants to merge 6 commits intomicrosoft:mainfrom
adamint:dev/adamint/walkthrough02
Closed

Add a walkthrough to install aspire CLI#12574
adamint wants to merge 6 commits intomicrosoft:mainfrom
adamint:dev/adamint/walkthrough02

Conversation

@adamint
Copy link
Copy Markdown
Member

@adamint adamint commented Oct 31, 2025

Description

Solves the problems of

  1. How do I acquire the CLI?
  2. How do I start using this extension?

When running an aspire vs code command or starting a new debug session, this adds a check that aspire is actually available on the path to use. If it is, the command is sent to the terminal/debug session can start (I've updated the logic around what specifically gets sent in AspireTerminalProvider to work in pwsh).

If aspire is not on the path, we show this error, which will navigate you directly to the CLI installation instructions in the readme. Unfortunately, programmatically opening the walkthrough I created does not consistently work, hence this alternative.
image

When first installing the Aspire extension, you will see a walkthrough - see screenshots for each step below (install, restart VS code, verify, next steps). I decided on asking the user to restart VS Code because a reload will not refresh the environment (PATH is not updated).

Walkthrough steps

Feel free to change the markdown text for any of them. Most is copilot-generated

Install CLI

image

Runs the same commands as in our readme.

Restart VS Code

image

Verify installation

image

(users see this on failure)
image

Next steps

image

Fixes #11910

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Oct 31, 2025

🚀 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 -- 12574

Or

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



getAspireCliExecutablePath(surroundWithQuotes: boolean = true): string {
getAspireCliExecutablePath(): string {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Simplifies getting the path and moves quoting/adding an ampersand on windows to sendAspireCommandToAspireTerminal

@adamint adamint changed the title Add a walkthrough to install aspire CLI, check that aspire exists on the PATH before running a command Add a walkthrough to install aspire CLI, check that aspire exists on the PATH before running a command, fix custom aspire path in pwsh Oct 31, 2025
@adamint adamint requested a review from davidfowl October 31, 2025 20:49
@adamint adamint marked this pull request as ready for review October 31, 2025 20:50
Copilot AI review requested due to automatic review settings October 31, 2025 20:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a VS Code walkthrough experience for new Aspire users, guiding them through CLI installation, verification, and getting started with Aspire projects. It also refactors the CLI path handling to properly support paths with special characters across different platforms.

Key changes:

  • Added a multi-step walkthrough with install, restart, verify, and next steps guidance
  • Refactored CLI path quoting logic to handle Windows PowerShell and Unix shells differently
  • Added CLI availability checks before command execution and debug sessions
  • Created comprehensive tests for CLI path handling

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
extension/walkthrough/*.md Four markdown files providing walkthrough step content for CLI installation, VS Code restart, verification, and next steps
extension/src/walkthroughCommands.ts New file implementing CLI verification, installation commands, and availability checks
extension/src/utils/AspireTerminalProvider.ts Refactored path quoting to use platform-specific shell syntax (PowerShell & on Windows, proper escaping on Unix)
extension/src/utils/workspace.ts Updated to use simplified CLI path method without quoting parameter
extension/src/test/aspireTerminalProvider.test.ts Comprehensive tests for CLI path retrieval with various edge cases
extension/src/loc/strings.ts Added localized strings for walkthrough messages
extension/src/extension.ts Registered new walkthrough commands and added CLI availability checks
extension/src/debugger/AspireDebugSession.ts Updated to use simplified CLI path method
extension/src/debugger/AspireDebugConfigurationProvider.ts Added CLI availability check before starting debug sessions
extension/package.nls.json Added localization entries for walkthrough strings
extension/package.json Defined walkthrough contribution with steps and completion events
extension/loc/xlf/aspire-vscode.xlf Added translation units for new localized strings
.github/copilot-instructions.md Added TypeScript and localization guidelines for extension development

@adamint adamint requested a review from mitchdenny November 5, 2025 06:16
@adamint
Copy link
Copy Markdown
Member Author

adamint commented Nov 6, 2025

hold for post-release

@adamint adamint changed the title Add a walkthrough to install aspire CLI, check that aspire exists on the PATH before running a command, fix custom aspire path in pwsh Add a walkthrough to install aspire CLI Jan 13, 2026
@adamint adamint marked this pull request as draft January 13, 2026 17:37
@radical radical mentioned this pull request Jan 13, 2026
@adamint adamint closed this Jan 16, 2026
@dotnet-policy-service dotnet-policy-service bot added this to the 13.2 milestone Jan 16, 2026
@github-actions github-actions bot locked and limited conversation to collaborators Feb 16, 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.

Walkthrough

2 participants