Skip to content

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

Merged
merged 40 commits into from
Jul 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
2700ca3
Initial drafts
adegeo Jun 27, 2025
b5c7a27
Apply suggestions from code review
adegeo Jun 30, 2025
4f9898b
Add first aspire cli ref doc
adegeo Jun 30, 2025
118898e
Feedback for install
adegeo Jun 30, 2025
3557b67
Update create and run sections
adegeo Jun 30, 2025
0709cee
Checkpoint
adegeo Jul 10, 2025
ed47d1b
Checkpoint 2
adegeo Jul 10, 2025
84392e1
Apply suggestions from code review
adegeo Jul 1, 2025
426fd7c
Test include
adegeo Jul 11, 2025
79be31f
Option test 2
adegeo Jul 11, 2025
2d0b274
Fix up aspire cmd; add aspire-new cmd.
adegeo Jul 11, 2025
8f0d6d3
Minor updates to overview
adegeo Jul 12, 2025
f5cc9d8
More includes
adegeo Jul 12, 2025
f29b8ee
More commands
adegeo Jul 12, 2025
5dc1cf4
Update new command
adegeo Jul 12, 2025
85b5f5f
Update output based on 9.4
adegeo Jul 14, 2025
893337c
Target 9.4
adegeo Jul 14, 2025
e0ff977
Table updates
adegeo Jul 16, 2025
dc0ddc2
Feedback
adegeo Jul 16, 2025
e7ff076
minor changes to overview
adegeo Jul 17, 2025
7391b5e
Add remaining commands
adegeo Jul 17, 2025
d29fe54
Fix headers
adegeo Jul 17, 2025
70d4bfe
fix table links
adegeo Jul 17, 2025
1af5fb8
minor
adegeo Jul 17, 2025
9e38441
Minor
adegeo Jul 18, 2025
1f73f7a
build-you-first-aspire-app, and setup-tooling: Add instructions to ge…
radical Jul 17, 2025
18e613c
Update wording around aspire run
adegeo Jul 18, 2025
e1905bc
Fix up AppHost vs app host
adegeo Jul 18, 2025
5feabe3
adjust heading
adegeo Jul 18, 2025
932bfca
Remove title/desc from include
adegeo Jul 18, 2025
a8e7ab0
Update config docs for global
adegeo Jul 18, 2025
25d8347
feedback
adegeo Jul 18, 2025
c91c686
Apply suggestions from code review
adegeo Jul 18, 2025
87c9528
minor
adegeo Jul 18, 2025
6d3b02c
feedback
adegeo Jul 21, 2025
4d66b0e
Update install with script
adegeo Jul 21, 2025
0bada4c
feedback
adegeo Jul 21, 2025
a859602
Apply suggestions from code review
adegeo Jul 21, 2025
1eec6f4
feedback
adegeo Jul 21, 2025
c643ab1
minor fixes and feedback
adegeo Jul 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions docs/cli-reference/aspire-add.md
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
```
51 changes: 51 additions & 0 deletions docs/cli-reference/aspire-config-delete.md
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`&mdash;The command succeeded.
- `1`&mdash;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)]
49 changes: 49 additions & 0 deletions docs/cli-reference/aspire-config-get.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`&mdash;The command succeeded.
- `10`&mdash;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)]
36 changes: 36 additions & 0 deletions docs/cli-reference/aspire-config-list.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)]
56 changes: 56 additions & 0 deletions docs/cli-reference/aspire-config-set.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
Copy link
Member

Choose a reason for hiding this comment

The 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).

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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 aspire config doc and the aspire config set doc.


**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)]
51 changes: 51 additions & 0 deletions docs/cli-reference/aspire-config.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)]
75 changes: 75 additions & 0 deletions docs/cli-reference/aspire-deploy.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.

- [!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
```
Loading