Skip to content

Commit 664f899

Browse files
IEvangelistCopilotadamint
authored
docs: document running the Aspire CLI via npm/npx (#1239)
* docs: document running the Aspire CLI via npm/npx The Aspire CLI is now published to npm as @microsoft/aspire-cli, so users can run any command (for example, the standalone dashboard) with npx and no install. Document the npm package and npx usage on the CLI install page, the standalone dashboard guide, and the aspire dashboard run command reference. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: David Pine <david.pine@microsoft.com> * Document npm CLI update command Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove npx-without-install section from install page Address PR feedback: the 'Run with npx without installing' section used a dashboard-specific example, which is out of place on the general install page. The standalone dashboard and 'aspire dashboard run' reference pages still document npx usage where it's contextually relevant. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: David Pine <7679720+IEvangelist@users.noreply.github.com> Co-authored-by: Adam Ratzman <adam@adamratzman.com>
1 parent b66edbe commit 664f899

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

src/frontend/src/content/docs/get-started/install-cli.mdx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,14 @@ npm install -g @microsoft/aspire-cli
8282

8383
The same command works on Windows, macOS, and Linux (including musl-based distributions such as Alpine). npm selects the correct native binary for your operating system and architecture automatically.
8484

85+
To update an npm-based install, run:
86+
87+
```bash title="Update with npm"
88+
npm install -g @microsoft/aspire-cli@latest
89+
```
90+
8591
:::note
86-
When you install from npm, the Aspire CLI routes self-updates through npm. Running `aspire update --self` prints the `npm install -g @microsoft/aspire-cli@latest` command to run rather than downloading a new binary directly. For more information, see [`aspire update`](/reference/cli/commands/aspire-update/).
92+
When you install from npm, the Aspire CLI routes self-updates through npm. Running `aspire update --self` prints the npm update command rather than downloading a new binary directly. For more information, see [`aspire update`](/reference/cli/commands/aspire-update/).
8793
:::
8894

8995
</TabItem>
@@ -140,5 +146,6 @@ The `+{commitSHA}` suffix indicates the specific commit from which the Aspire CL
140146
## See also
141147

142148
- [aspire-install script reference](/reference/cli/install-script/)
149+
- [`@microsoft/aspire-cli` on npm](https://www.npmjs.com/package/@microsoft/aspire-cli) — run the CLI with `npm` or `npx`
143150
- [`aspire` command reference](/reference/cli/commands/aspire/)
144151
- [Aspire VS Code extension](/get-started/aspire-vscode-extension/) — install the CLI and use Aspire commands from within VS Code

src/frontend/src/content/docs/reference/cli/commands/aspire-dashboard-run.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ import Include from '@components/Include.astro';
1717
aspire dashboard run [options]
1818
```
1919

20+
:::tip[Run without installing]{icon="node"}
21+
If your [Node.js](https://nodejs.org/) version meets the [`@microsoft/aspire-cli` npm package requirements](https://www.npmjs.com/package/@microsoft/aspire-cli), you can start the dashboard without installing the CLI by running it through [npx](https://docs.npmjs.com/cli/commands/npx):
22+
23+
```bash title="Run dashboard with npx"
24+
npx -y @microsoft/aspire-cli dashboard run
25+
```
26+
:::
27+
2028
## Description
2129

2230
The `aspire dashboard run` command starts a standalone Aspire Dashboard instance. The dashboard receives OpenTelemetry data (logs, traces, and metrics) and provides a web-based UI for viewing telemetry.

0 commit comments

Comments
 (0)