Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
30 changes: 30 additions & 0 deletions src/frontend/config/sidebar/reference.topics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,36 @@ export const referenceTopics: StarlightSidebarTopicsUserConfig[number] = {
slug: 'reference/cli/commands/aspire-publish',
},
{ label: 'aspire run', slug: 'reference/cli/commands/aspire-run' },
{
label: 'aspire secret',
collapsed: true,
items: [
{
label: 'aspire secret',
slug: 'reference/cli/commands/aspire-secret',
},
{
label: 'aspire secret set',
slug: 'reference/cli/commands/aspire-secret-set',
},
{
label: 'aspire secret get',
slug: 'reference/cli/commands/aspire-secret-get',
},
{
label: 'aspire secret list',
slug: 'reference/cli/commands/aspire-secret-list',
},
{
label: 'aspire secret delete',
slug: 'reference/cli/commands/aspire-secret-delete',
},
{
label: 'aspire secret path',
slug: 'reference/cli/commands/aspire-secret-path',
},
],
},
{ label: 'aspire stop', slug: 'reference/cli/commands/aspire-stop' },
{
label: 'aspire update',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
title: aspire secret delete command
description: Learn about the aspire secret delete command and its usage. This command deletes a user secret for an Aspire AppHost.
---

import Include from '@components/Include.astro';

## Name

`aspire secret delete` - Delete a secret.

## Synopsis

```bash title="Aspire CLI"
aspire secret delete <key> [options]
```

## Description

The `aspire secret delete` command deletes a user secret from the secrets store for an Aspire AppHost.

<Include relativePath="reference/cli/includes/project-search-logic-description.md" />

The command returns the following exit codes:

- `0`—The command succeeded.
- `3`—Failed to find the AppHost project.
- `4`—The specified secret key was not found.

## Arguments

The following arguments are available:

- **`key`**

The secret key to delete.

## Options

The following options are available:

- **`--apphost`**

The path to the Aspire AppHost project file. Alias: `--project`.

- <Include relativePath="reference/cli/includes/option-help.md" />

- <Include relativePath="reference/cli/includes/option-debug.md" />

- <Include relativePath="reference/cli/includes/option-wait.md" />

## Examples

- Delete a secret:

```bash title="Aspire CLI"
aspire secret delete Parameters:postgres-password
```

- Delete a secret for a specific AppHost:

```bash title="Aspire CLI"
aspire secret delete Parameters:rabbitmq-password --project ./src/MyApp.AppHost/MyApp.AppHost.csproj
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
title: aspire secret get command
description: Learn about the aspire secret get command and its usage. This command retrieves a user secret value for an Aspire AppHost.
---

import Include from '@components/Include.astro';

## Name

`aspire secret get` - Get a secret value.

## Synopsis

```bash title="Aspire CLI"
aspire secret get <key> [options]
```

## Description

The `aspire secret get` command retrieves a user secret value for an Aspire AppHost.

<Include relativePath="reference/cli/includes/project-search-logic-description.md" />

The command returns the following exit codes:

- `0`—The command succeeded.
- `3`—Failed to find the AppHost project.
- `4`—The specified secret key was not found.

## Arguments

The following arguments are available:

- **`key`**

The secret key to retrieve.

## Options

The following options are available:

- **`--apphost`**

The path to the Aspire AppHost project file. Alias: `--project`.

- <Include relativePath="reference/cli/includes/option-help.md" />

- <Include relativePath="reference/cli/includes/option-debug.md" />

- <Include relativePath="reference/cli/includes/option-wait.md" />

## Examples

- Get the value of a password parameter:

```bash title="Aspire CLI"
aspire secret get Parameters:postgres-password
```

- Get a secret for a specific AppHost:

```bash title="Aspire CLI"
aspire secret get Parameters:rabbitmq-password --project ./src/MyApp.AppHost/MyApp.AppHost.csproj
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
title: aspire secret list command
description: Learn about the aspire secret list command and its usage. This command lists all user secrets for an Aspire AppHost.
---

import Include from '@components/Include.astro';

## Name

`aspire secret list` - List all secrets.

## Synopsis

```bash title="Aspire CLI"
aspire secret list [options]
```

## Description

The `aspire secret list` command lists all user secrets stored for an Aspire AppHost. By default, secrets are displayed in a table format sorted alphabetically by key. If no secrets are configured, the command displays "No secrets configured."

<Include relativePath="reference/cli/includes/project-search-logic-description.md" />

## Options

The following options are available:

- **`--format <Json|Table>`**

Output format. Use `Json` for machine-readable output suitable for scripting and automation. Defaults to `Table`.

- **`--apphost`**

The path to the Aspire AppHost project file. Alias: `--project`.

- <Include relativePath="reference/cli/includes/option-help.md" />

- <Include relativePath="reference/cli/includes/option-debug.md" />

- <Include relativePath="reference/cli/includes/option-wait.md" />

## Examples

- List all secrets for the current AppHost:

```bash title="Aspire CLI"
aspire secret list
```

- List secrets in JSON format:

```bash title="Aspire CLI"
aspire secret list --format json
```

- List secrets for a specific AppHost:

```bash title="Aspire CLI"
aspire secret list --project ./src/MyApp.AppHost/MyApp.AppHost.csproj
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: aspire secret path command
description: Learn about the aspire secret path command and its usage. This command shows the file path where user secrets are stored for an Aspire AppHost.
---

import Include from '@components/Include.astro';

## Name

`aspire secret path` - Show the secrets file path.

## Synopsis

```bash title="Aspire CLI"
aspire secret path [options]
```

## Description

The `aspire secret path` command displays the full file path to the user secrets file for an Aspire AppHost. This is useful when you need to directly inspect or edit the secrets file, or when troubleshooting secrets resolution.

<Include relativePath="reference/cli/includes/project-search-logic-description.md" />

## Options

The following options are available:

- **`--apphost`**

The path to the Aspire AppHost project file. Alias: `--project`.

- <Include relativePath="reference/cli/includes/option-help.md" />

- <Include relativePath="reference/cli/includes/option-debug.md" />

- <Include relativePath="reference/cli/includes/option-wait.md" />

## Examples

- Show the secrets file path for the current AppHost:

```bash title="Aspire CLI"
aspire secret path
```

- Show the secrets file path for a specific AppHost:

```bash title="Aspire CLI"
aspire secret path --project ./src/MyApp.AppHost/MyApp.AppHost.csproj
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
title: aspire secret set command
description: Learn about the aspire secret set command and its usage. This command sets a user secret value for an Aspire AppHost.
---

import Include from '@components/Include.astro';

## Name

`aspire secret set` - Set a secret value.

## Synopsis

```bash title="Aspire CLI"
aspire secret set <key> <value> [options]
```

## Description

The `aspire secret set` command sets a user secret value for an Aspire AppHost. If user secrets haven't been initialized for the AppHost yet, this command automatically initializes them before setting the value.

<Include relativePath="reference/cli/includes/project-search-logic-description.md" />

## Arguments

The following arguments are available:

- **`key`**

The secret key to set. Use a colon (`:`) as a separator for hierarchical keys, such as `Parameters:postgres-password`.

- **`value`**

The secret value to set.

## Options

The following options are available:

- **`--apphost`**

The path to the Aspire AppHost project file. Alias: `--project`.

- <Include relativePath="reference/cli/includes/option-help.md" />

- <Include relativePath="reference/cli/includes/option-debug.md" />

- <Include relativePath="reference/cli/includes/option-wait.md" />

## Examples

- Set a password parameter:

```bash title="Aspire CLI"
aspire secret set Parameters:postgres-password MySecretPassword123
```

- Set a secret for a specific AppHost:

```bash title="Aspire CLI"
aspire secret set Parameters:rabbitmq-password Pass123 --project ./src/MyApp.AppHost/MyApp.AppHost.csproj
```
Loading