diff --git a/src/frontend/src/content/docs/get-started/install-cli.mdx b/src/frontend/src/content/docs/get-started/install-cli.mdx index 376a74b6d..0c828eb43 100644 --- a/src/frontend/src/content/docs/get-started/install-cli.mdx +++ b/src/frontend/src/content/docs/get-started/install-cli.mdx @@ -1,7 +1,7 @@ --- title: Install Aspire CLI -seoTitle: 'Install Aspire CLI: install script, .NET tool, or npm' -description: Learn how to install the Aspire CLI using the install script, .NET global tool, or npm to manage your cloud-native applications. +seoTitle: Install Aspire CLI with a script or package manager +description: Learn how to install the Aspire CLI with the install script or a package manager — npm, NuGet, WinGet, or Homebrew — to build and run cloud-native apps. lastUpdated: true tableOfContents: true --- @@ -16,7 +16,7 @@ import { Tabs, } from '@astrojs/starlight/components'; -Aspire provides a command-line interface (CLI) tool to help you create and manage Aspire-based apps. The CLI streamlines your development workflow with an interactive-first experience. This guide shows you how to install the Aspire CLI on your system. You can install the CLI with the install script, .NET global tool, or npm. Use the install script for the fastest setup, or choose the package manager that matches your AppHost language. +Aspire provides a command-line interface (CLI) tool to help you create and manage Aspire-based apps. The CLI streamlines your development workflow with an interactive-first experience. This guide shows you how to install the Aspire CLI on your system. Use the install script for the fastest setup, or choose the package manager that fits your environment — npm, NuGet, WinGet, or Homebrew. Before installing the Aspire CLI, ensure you have the [required @@ -50,27 +50,23 @@ At any time, you can reopen the **Install Aspire CLI** command modal from the to You only need to download the script separately if you want to inspect it or run the installer as separate commands. For more information, see the [aspire-install script reference](/reference/cli/install-script/). -## Install for your AppHost language +## Install with a package manager -The install script works for all AppHost languages. If you prefer to manage the Aspire CLI with a language-specific package manager, use the option that matches your AppHost project: +The install script works on every supported platform. If you prefer to manage the Aspire CLI alongside your other developer tooling, install it with a package manager instead. Choose the option that fits your environment: - - + + -Use the .NET global tool when you want to manage the Aspire CLI with the .NET SDK in a C# AppHost project. This option requires the [.NET SDK](/get-started/prerequisites/). +Install the Aspire CLI with [Homebrew](https://brew.sh/) on macOS (Apple silicon and Intel). -To install the latest stable release globally, run: - -```bash title="Install with .NET global tool" -dotnet tool install -g Aspire.Cli +```bash title="Install with Homebrew" +brew install --cask microsoft/aspire/aspire ``` - + -Starting with Aspire 13.4, install the Aspire CLI from npm if you already manage developer tooling with npm or work in a TypeScript AppHost project. This option requires [Node.js](https://nodejs.org/). - -To install the latest stable release globally, run: +Install the Aspire CLI from [npm](https://www.npmjs.com/package/@microsoft/aspire-cli) when you manage developer tooling with npm. This option requires [Node.js](/get-started/prerequisites/). ```bash title="Install with npm" npm install -g @microsoft/aspire-cli @@ -82,6 +78,26 @@ The same command works on Windows, macOS, and Linux (including musl-based distri 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/). ::: + + + +Install the Aspire CLI as a .NET global tool when you manage developer tooling with the .NET SDK. This option requires the [.NET SDK](/get-started/prerequisites/). + +```bash title="Install with the .NET CLI" +dotnet tool install -g Aspire.Cli +``` + +The CLI is published to NuGet.org as the [Aspire.Cli](https://www.nuget.org/packages/Aspire.Cli) global tool and works on Windows, macOS, and Linux. + + + + +Install the Aspire CLI with the [Windows Package Manager](https://learn.microsoft.com/windows/package-manager/) (WinGet) on Windows (x64 and Arm64). + +```powershell title="Install with WinGet" +winget install Microsoft.Aspire +``` + diff --git a/src/frontend/src/content/docs/get-started/prerequisites.mdx b/src/frontend/src/content/docs/get-started/prerequisites.mdx index ce6475219..34f8e7f2f 100644 --- a/src/frontend/src/content/docs/get-started/prerequisites.mdx +++ b/src/frontend/src/content/docs/get-started/prerequisites.mdx @@ -33,7 +33,17 @@ Ready to dive into Aspire? Before you begin, make sure your development environm - Aspire's TypeScript AppHost requires a supported [Node.js](https://nodejs.org/) LTS release: **22.x or 24.x** — the engine range that `aspire init` writes into the scaffolded `package.json` (`"engines": { "node": "^22.13.0 || ^24.0.0" }`). It also requires a [supported AppHost-root package manager](/app-host/typescript-apphost/#package-managers): **npm** (default, included with Node.js), **pnpm**, **Yarn 4+** (Berry), or **Bun**. **Yarn Classic (v1) is not supported.** The Aspire CLI auto-detects the active toolchain from your `package.json` `packageManager` field or from lockfiles in your project directory or parent directories. + Aspire's TypeScript AppHost requires a supported [Node.js](https://nodejs.org/) release: **Node.js 20.19+, 22.13+, or 24+**. When you run `aspire init`, the CLI writes this engine range into the scaffolded `package.json`: + + ```json title="package.json" + { + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + } + ``` + + It also requires a [supported AppHost-root package manager](/app-host/typescript-apphost/#package-managers): **npm** (default, included with Node.js), **pnpm**, **Yarn 4+** (Berry), or **Bun**. **Yarn Classic (v1) is not supported.** The Aspire CLI auto-detects the active toolchain from your `package.json` `packageManager` field or from lockfiles in your project directory or parent directories. Follow the [Node.js installation instructions](https://nodejs.org/) for your operating system (Windows, macOS, or Linux) to complete the setup. If you use an alternative package manager, install it separately: diff --git a/src/frontend/src/content/docs/ja/get-started/install-cli.mdx b/src/frontend/src/content/docs/ja/get-started/install-cli.mdx index 2565eec10..b6b16fc6a 100644 --- a/src/frontend/src/content/docs/ja/get-started/install-cli.mdx +++ b/src/frontend/src/content/docs/ja/get-started/install-cli.mdx @@ -1,15 +1,15 @@ --- title: Aspire CLI をインストール -description: クラウドネイティブ アプリを管理するために、Aspire CLI をネイティブ実行ファイルまたは .NET グローバル ツールとしてインストールする方法を学びます。 +description: クラウドネイティブ アプリを管理するために、Aspire CLI をインストール スクリプトまたはパッケージ マネージャー (npm、NuGet、WinGet、Homebrew) でインストールする方法を学びます。 lastUpdated: true tableOfContents: true --- import LearnMore from '@components/LearnMore.astro'; import OsAwareTabs from '@components/OsAwareTabs.astro'; -import { Aside, Code, Icon } from '@astrojs/starlight/components'; +import { Aside, Code, Icon, TabItem, Tabs } from '@astrojs/starlight/components'; -Aspire には、Aspire ベースのアプリの作成と管理を支援するコマンドライン インターフェイス (CLI) ツールが用意されています。CLI は、インタラクティブファーストな体験で開発ワークフローを効率化します。このガイドでは、システムに Aspire CLI をインストールする方法を説明します。 +Aspire には、Aspire ベースのアプリの作成と管理を支援するコマンドライン インターフェイス (CLI) ツールが用意されています。CLI は、インタラクティブファーストな体験で開発ワークフローを効率化します。このガイドでは、システムに Aspire CLI をインストールする方法を説明します。最速のセットアップにはインストール スクリプトを使用するか、環境に合ったパッケージ マネージャー (npm、NuGet、WinGet、Homebrew) を選択してください。 Aspire CLI をインストールする前に、[必要な @@ -43,6 +43,57 @@ Aspire CLI をインストールするには、1 つのコマンドでインス スクリプトを確認したい場合や、インストーラーをコマンドを分けて実行したい場合にのみ、スクリプトを個別にダウンロードする必要があります。詳細は [aspire-install スクリプト リファレンス](/ja/reference/cli/install-script/) を参照してください。 +## パッケージ マネージャーでインストール + +インストール スクリプトは、サポートされているすべてのプラットフォームで動作します。Aspire CLI を他の開発ツールと一緒に管理したい場合は、代わりにパッケージ マネージャーでインストールできます。環境に合ったオプションを選択してください: + + + + +macOS (Apple シリコンと Intel) では、[Homebrew](https://brew.sh/) で Aspire CLI をインストールします。 + +```bash title="Homebrew でインストール" +brew install --cask microsoft/aspire/aspire +``` + + + + +開発ツールを npm で管理している場合は、[npm](https://www.npmjs.com/package/@microsoft/aspire-cli) から Aspire CLI をインストールします。このオプションには [Node.js](/ja/get-started/prerequisites/) が必要です。 + +```bash title="npm でインストール" +npm install -g @microsoft/aspire-cli +``` + +同じコマンドが Windows、macOS、Linux (Alpine などの musl ベースのディストリビューションを含む) で動作します。npm はお使いのオペレーティング システムとアーキテクチャに適したネイティブ バイナリを自動的に選択します。 + +:::note +npm からインストールすると、Aspire CLI はセルフ更新を npm 経由でルーティングします。`aspire update --self` を実行すると、バイナリを直接ダウンロードする代わりに、実行すべき `npm install -g @microsoft/aspire-cli@latest` コマンドが表示されます。詳細は [`aspire update`](/ja/reference/cli/commands/aspire-update/) を参照してください。 +::: + + + + +開発ツールを .NET SDK で管理している場合は、Aspire CLI を .NET グローバル ツールとしてインストールします。このオプションには [.NET SDK](/ja/get-started/prerequisites/) が必要です。 + +```bash title=".NET CLI でインストール" +dotnet tool install -g Aspire.Cli +``` + +CLI は [Aspire.Cli](https://www.nuget.org/packages/Aspire.Cli) グローバル ツールとして NuGet.org に公開されており、Windows、macOS、Linux で動作します。 + + + + +Windows (x64 と Arm64) では、[Windows パッケージ マネージャー](https://learn.microsoft.com/windows/package-manager/) (WinGet) で Aspire CLI をインストールします。 + +```powershell title="WinGet でインストール" +winget install Microsoft.Aspire +``` + + + + ## 検証 Aspire CLI がインストールされていることを検証するには、`aspire --version` を使用して Aspire CLI からバージョン番号を取得します: diff --git a/src/frontend/src/content/docs/ja/get-started/prerequisites.mdx b/src/frontend/src/content/docs/ja/get-started/prerequisites.mdx index 43394226b..3b7fc955b 100644 --- a/src/frontend/src/content/docs/ja/get-started/prerequisites.mdx +++ b/src/frontend/src/content/docs/ja/get-started/prerequisites.mdx @@ -32,7 +32,17 @@ Aspire を始める準備はできていますか?開始する前に、開発 - Aspire の TypeScript AppHost には [Node.js](https://nodejs.org/) 20 以降 (LTS 推奨) と互換性のあるパッケージ マネージャーが必要です。次のパッケージ マネージャーがサポートされています: **npm** (Node.js に含まれています)、**pnpm**、**Yarn**、**Bun**。Aspire CLI は `package.json` の `packageManager` フィールドまたはプロジェクト ディレクトリと親ディレクトリのロックファイルからアクティブなツールチェーンを自動検出します。 + Aspire の TypeScript AppHost には、サポートされている [Node.js](https://nodejs.org/) リリース (**Node.js 20.19 以降、22.13 以降、または 24 以降**) が必要です。`aspire init` を実行すると、CLI はこのエンジン範囲をスキャフォールドされた `package.json` に書き込みます: + + ```json title="package.json" + { + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + } + ``` + + また、[サポートされている AppHost ルートのパッケージ マネージャー](/ja/app-host/typescript-apphost/#パッケージマネージャー) も必要です: **npm** (デフォルト、Node.js に含まれています)、**pnpm**、**Yarn 4 以降** (Berry)、または **Bun**。**Yarn Classic (v1) はサポートされていません。** Aspire CLI は `package.json` の `packageManager` フィールドまたはプロジェクト ディレクトリと親ディレクトリのロックファイルからアクティブなツールチェーンを自動検出します。 お使いのオペレーティング システム (Windows、macOS、Linux) に応じた [Node.js のインストール手順](https://nodejs.org/) に従ってセットアップを完了します。別のパッケージ マネージャーを使う場合は、個別にインストールしてください: diff --git a/src/frontend/src/content/docs/whats-new/aspire-13-4.mdx b/src/frontend/src/content/docs/whats-new/aspire-13-4.mdx index e8a469472..b3f106fa1 100644 --- a/src/frontend/src/content/docs/whats-new/aspire-13-4.mdx +++ b/src/frontend/src/content/docs/whats-new/aspire-13-4.mdx @@ -377,7 +377,7 @@ Aspire 13.4 includes a set of smaller CLI improvements and fixes: - `aspire logs` dims timestamps for readability and shows `No logs found.` when there are no entries, while preserving JSON output for automation. - Log file paths in CLI output are clickable terminal links when the terminal supports hyperlinks and degrade gracefully to plain text otherwise. - Package-manager installs such as WinGet, Homebrew, and `dotnet tool` keep the CLI bundle beside the CLI binary, so uninstall and upgrade flows clean up the bundle correctly. -- The Aspire CLI can now be installed from npm (`npm install -g @microsoft/aspire-cli`). When installed this way, `aspire update --self` and update notices print the matching `npm install -g @microsoft/aspire-cli@latest` command instead of overwriting the npm-managed binary. See [Install for your AppHost language](/get-started/install-cli/#install-for-your-apphost-language). +- The Aspire CLI can now be installed from npm (`npm install -g @microsoft/aspire-cli`). When installed this way, `aspire update --self` and update notices print the matching `npm install -g @microsoft/aspire-cli@latest` command instead of overwriting the npm-managed binary. See [Install with a package manager](/get-started/install-cli/#install-with-a-package-manager). - `aspire update` now requires `--yes` in non-interactive mode, matching `aspire destroy`. - `aspire stop --all` output includes the AppHost name and, when needed, the PID for clearer multi-instance shutdown output. - `aspire new`, `aspire init`, `aspire run`, and `aspire update` include fixes for NuGet feed errors, output paths, generated files, disabled dashboards, detached shutdown, and AppHost package-reference cleanup.