-
Notifications
You must be signed in to change notification settings - Fork 155
Initial drafts of .NET Aspire CLI docs #3905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2700ca3
b5c7a27
4f9898b
118898e
3557b67
0709cee
ed47d1b
84392e1
426fd7c
79be31f
2d0b274
8f0d6d3
f5cc9d8
f29b8ee
5dc1cf4
85b5f5f
893337c
e0ff977
dc0ddc2
e7ff076
7391b5e
d29fe54
70d4bfe
1af5fb8
9e38441
1f73f7a
18e613c
e1905bc
5feabe3
932bfca
a8e7ab0
25d8347
c91c686
87c9528
6d3b02c
4d66b0e
0bada4c
a859602
1eec6f4
c643ab1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
title: aspire add command | ||
description: Learn about the aspire add command and its usage. This command adds an integration package to an Aspire AppHost project. | ||
ms.date: 07/11/2025 | ||
--- | ||
# aspire add command | ||
|
||
**This article applies to:** ✔️ Aspire CLI 9.4.0 and later versions | ||
|
||
## Name | ||
|
||
`aspire add` - Add an integration to the Aspire project. | ||
|
||
## Synopsis | ||
|
||
```Command | ||
aspire add [<integration>] [options] | ||
``` | ||
|
||
## Description | ||
|
||
The `aspire add` command searches for an integration package and adds it to the Aspire AppHost. | ||
|
||
[!INCLUDE [project-search-logic-description](includes/project-search-logic-description.md)] | ||
|
||
## Arguments | ||
|
||
The following arguments are available: | ||
|
||
- **`integration`** | ||
|
||
The name of the integration to add (for example: redis, postgres). | ||
|
||
If a partial name or invalid name is provided, the CLI searches NuGet for approximate matches and prints them in the terminal for the user to select. If no results are found, all packages are listed. | ||
|
||
## Options | ||
|
||
The following options are available: | ||
|
||
- [!INCLUDE [option-project](includes/option-project.md)] | ||
|
||
- **`-v, --version`** | ||
|
||
The version of the integration to add. | ||
|
||
- **`-s, --source`** | ||
|
||
The NuGet source to use for the integration. | ||
|
||
- [!INCLUDE [option-help](includes/option-help.md)] | ||
|
||
- [!INCLUDE [option-debug](includes/option-debug.md)] | ||
|
||
- [!INCLUDE [option-wait](includes/option-wait.md)] | ||
|
||
## Examples | ||
|
||
- Finds an AppHost project and lists all Aspire integration packages from NuGet: | ||
|
||
```Command | ||
aspire add | ||
``` | ||
|
||
- Finds an AppHost project and adds the **kafka** (Aspire.Hosting.Kafka) integration package: | ||
|
||
```Command | ||
aspire add kafka --version 9.3.2 | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
title: aspire config delete command | ||
description: Learn about the aspire config delete command and its usage. This command deletes an Aspire CLI config value by key name. | ||
ms.date: 07/11/2025 | ||
--- | ||
# aspire config delete command | ||
|
||
**This article applies to:** ✔️ Aspire CLI 9.4.0 and later versions | ||
|
||
## Name | ||
|
||
`aspire config delete` - Delete a configuration value. | ||
|
||
## Synopsis | ||
|
||
```Command | ||
aspire config delete <key> [options] | ||
``` | ||
|
||
## Description | ||
|
||
The `aspire config delete` command delete's a config value by key name. | ||
|
||
[!INCLUDE [config-file-description](includes/config-file-description.md)] | ||
|
||
The command returns the following exit codes: | ||
|
||
- `0`—The command succeeded. | ||
- `1`—The supplied key doesn't exist in the config file, or the config file is missing. | ||
|
||
## Arguments | ||
|
||
The following arguments are available: | ||
|
||
- **`key`** | ||
|
||
The configuration key to delete. | ||
|
||
## Options | ||
|
||
The following options are available: | ||
|
||
- **`-g, --global`** | ||
|
||
Delete the configuration value from the global `$HOME/.aspire/settings.json` instead of the local settings file. | ||
|
||
- [!INCLUDE [option-help](includes/option-help.md)] | ||
|
||
- [!INCLUDE [option-debug](includes/option-debug.md)] | ||
|
||
- [!INCLUDE [option-wait](includes/option-wait.md)] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
title: aspire config get command | ||
description: Learn about the aspire config get command and its usage. This command gets an Aspire CLI config value by key name. | ||
ms.date: 07/11/2025 | ||
--- | ||
# aspire config get command | ||
|
||
**This article applies to:** ✔️ Aspire CLI 9.4.0 and later versions | ||
|
||
## Name | ||
|
||
`aspire config get` - Get a configuration value. | ||
|
||
## Synopsis | ||
|
||
```Command | ||
aspire config get <key> [options] | ||
``` | ||
|
||
## Description | ||
|
||
The `aspire config get` command retrieves a config value by key name. | ||
|
||
[!INCLUDE [config-file-description](includes/config-file-description.md)] | ||
|
||
If the config value doesn't exist in a local settings file, the config file is retrieved from the global settings file. | ||
|
||
The command returns the following exit codes: | ||
|
||
- `0`—The command succeeded. | ||
- `10`—The supplied key doesn't exist in the config file, or the config file is missing. | ||
|
||
## Arguments | ||
|
||
The following arguments are available: | ||
|
||
- **`key`** | ||
|
||
The configuration key to retrieve. | ||
|
||
## Options | ||
|
||
The following options are available: | ||
|
||
- [!INCLUDE [option-help](includes/option-help.md)] | ||
|
||
- [!INCLUDE [option-debug](includes/option-debug.md)] | ||
|
||
- [!INCLUDE [option-wait](includes/option-wait.md)] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
title: aspire config list command | ||
description: Learn about the aspire config list command and its usage. This command lists all Aspire CLI config values. | ||
ms.date: 07/11/2025 | ||
--- | ||
# aspire config list command | ||
|
||
**This article applies to:** ✔️ Aspire CLI 9.4.0 and later versions | ||
|
||
## Name | ||
|
||
`aspire config list` - List all configuration values. | ||
|
||
## Synopsis | ||
|
||
```Command | ||
aspire config list [options] | ||
``` | ||
|
||
## Description | ||
|
||
The `aspire config list` command lists all config value by key name. | ||
|
||
[!INCLUDE [config-file-description](includes/config-file-description.md)] | ||
|
||
This command lists both the global and local settings. If a local setting overrides a global setting, only the local setting is displayed. | ||
|
||
## Options | ||
|
||
The following options are available: | ||
|
||
- [!INCLUDE [option-help](includes/option-help.md)] | ||
|
||
- [!INCLUDE [option-debug](includes/option-debug.md)] | ||
|
||
- [!INCLUDE [option-wait](includes/option-wait.md)] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
title: aspire config set command | ||
description: Learn about the aspire config set command and its usage. This command sets an Aspire CLI config value by key name. | ||
ms.date: 07/11/2025 | ||
--- | ||
# aspire config set command | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it would be good to have a page which covers off known feature flags (in the Aspire repo there is a KnownFeatures.cs for reference). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. For now, I just added a table to a section that lists the one command I know is working. I played around with setting those other ones in the config file but it didn't seem to do anything. I added this table to the root |
||
|
||
**This article applies to:** ✔️ Aspire CLI 9.4.0 and later versions | ||
|
||
## Name | ||
|
||
`aspire config set` - Set a configuration value. | ||
|
||
## Synopsis | ||
|
||
```Command | ||
aspire config set <key> <value> [options] | ||
``` | ||
|
||
## Description | ||
|
||
The `aspire config set` command sets a config value by key name. | ||
|
||
[!INCLUDE [config-file-description](includes/config-file-description.md)] | ||
|
||
## Arguments | ||
|
||
The following arguments are available: | ||
|
||
- **`key`** | ||
|
||
The configuration key to set. | ||
|
||
- **`value`** | ||
|
||
The configuration value to set. | ||
|
||
## Options | ||
|
||
The following options are available: | ||
|
||
- **`-g, --global`** | ||
|
||
Set the configuration value globally in `$HOME/.aspire/settings.json` instead of the local settings file. | ||
|
||
- [!INCLUDE [option-help](includes/option-help.md)] | ||
|
||
- [!INCLUDE [option-debug](includes/option-debug.md)] | ||
|
||
- [!INCLUDE [option-wait](includes/option-wait.md)] | ||
|
||
## Settings | ||
|
||
The following config settings are available: | ||
|
||
[!INCLUDE [config-settings-table](includes/config-settings-table.md)] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
title: aspire config command | ||
description: Learn about the aspire config command and its usage. This command driver is used to manage the Aspire CLI config settings. | ||
ms.date: 07/11/2025 | ||
--- | ||
# aspire config command | ||
|
||
**This article applies to:** ✔️ Aspire CLI 9.4.0 and later versions | ||
|
||
## Name | ||
|
||
`aspire config` - Manage configuration settings. | ||
|
||
## Synopsis | ||
|
||
```Command | ||
aspire config [command] [options] | ||
``` | ||
|
||
## Description | ||
|
||
The `aspire config` command driver provides commands to manage the Aspire CLI config settings. | ||
|
||
[!INCLUDE [config-file-description](includes/config-file-description.md)] | ||
|
||
## Options | ||
|
||
The following options are available: | ||
|
||
- [!INCLUDE [option-help](includes/option-help.md)] | ||
|
||
- [!INCLUDE [option-debug](includes/option-debug.md)] | ||
|
||
- [!INCLUDE [option-wait](includes/option-wait.md)] | ||
|
||
## Commands | ||
|
||
The following commands are available: | ||
|
||
| Command | Status | Function | | ||
|-----------------------------------------------------------|--------|--------------------------------| | ||
| [`aspire config list`](aspire-config-list.md) | Stable | List all configuration values. | | ||
| [`aspire config get <key>`](aspire-config-get.md) | Stable | Get a configuration value. | | ||
| [`aspire config set <key> <value>`](aspire-config-set.md) | Stable | Set a configuration value. | | ||
| [`aspire config delete <key>`](aspire-config-delete.md) | Stable | Delete a configuration value. | | ||
|
||
## Settings | ||
|
||
The following config settings are available: | ||
|
||
[!INCLUDE [config-settings-table](includes/config-settings-table.md)] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
--- | ||
title: aspire deploy command | ||
description: Learn about the aspire deploy command and its usage. This command first runs publishing mode, then invokes resource deployments declared by the app host. | ||
ms.date: 07/11/2025 | ||
--- | ||
# aspire deploy command | ||
|
||
**This article applies to:** ✔️ Aspire CLI 9.4.0 and later versions. | ||
|
||
## Name | ||
|
||
`aspire deploy` - Deploy a codebase orchestrated with Aspire to specified targets. | ||
|
||
[!INCLUDE [mode-preview](includes/mode-preview.md)] | ||
|
||
## Synopsis | ||
|
||
```Command | ||
aspire deploy [options] [[--] <additional arguments>...] | ||
``` | ||
|
||
## Description | ||
|
||
The `aspire deploy` command first invokes the [`aspire publish`](./aspire-publish.md) command. After which, Aspire invokes all `DeployingCallbackAnnotation` resource annotations, in the order they're declared. | ||
|
||
[!INCLUDE [project-search-logic-description](includes/project-search-logic-description.md)] | ||
|
||
The command performs the following steps to deploy an app orchestrated with Aspire: | ||
|
||
- Creates or modifies the `.aspire/settings.json` config file in the current directory, and sets the `appHostPath` config value to the path of the AppHost project file. | ||
- Installs or verifies that Aspire's local hosting certificates are installed and trusted. | ||
- Builds the AppHost project and its resources. | ||
- Starts the AppHost and its resources. | ||
- Invokes all <xref:Aspire.Hosting.ApplicationModel.PublishingCallbackAnnotation> resource annotations. | ||
- Invokes all `DeployingCallbackAnnotation` resource annotations. | ||
|
||
## Options | ||
|
||
The following options are available: | ||
|
||
- **`--`** | ||
|
||
Delimits arguments to aspire publish from arguments for the app host. All arguments after this delimiter are passed to the app host. | ||
adegeo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- [!INCLUDE [option-project](includes/option-project.md)] | ||
|
||
- **`-o, --output-path`** | ||
|
||
The output path for deployment artifacts. Defaults to a folder named _deploy_ in the current directory. | ||
|
||
- [!INCLUDE [option-help](includes/option-help.md)] | ||
|
||
- [!INCLUDE [option-debug](includes/option-debug.md)] | ||
|
||
- [!INCLUDE [option-wait](includes/option-wait.md)] | ||
|
||
## Examples | ||
|
||
- Search the current directory structure for AppHost projects to build, publish, and deploy: | ||
|
||
```Command | ||
aspire deploy | ||
``` | ||
|
||
- Publish and deploy an Aspire apphost and its dependencies: | ||
|
||
```Command | ||
aspire deploy --project './projects/apphost/orchestration.AppHost.csproj' | ||
``` | ||
|
||
- Publish and deploy an Aspire AppHost with arguments: | ||
|
||
```Command | ||
aspire deploy --project './projects/apphost/orchestration.AppHost.csproj' -- -fast | ||
``` |
Uh oh!
There was an error while loading. Please reload this page.