# aspire add command

## Name

`aspire add` - Add an integration to the Aspire project.

## Synopsis

```bash title="Aspire CLI"
aspire add [<integration>] [options]
```

## Description

The `aspire add` command searches for an integration package and adds it to the Aspire AppHost. The persisted change depends on the AppHost style:

- Project-based C# AppHosts receive a package reference.
- File-based C# AppHosts receive a `#:package` directive.
- TypeScript AppHosts receive an entry in the `packages` section of `aspire.config.json`, then the generated `.aspire/modules/` TypeScript SDK is regenerated.

<Include relativePath="reference/cli/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 relativePath="reference/cli/includes/option-project.md" />

- **`-v, --version`**

  The version of the integration to add.

- **`-s, --source`**

  The NuGet source to use for the integration.

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

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

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

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

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

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

## Examples

- Finds an AppHost project and lists all Aspire integration packages from NuGet:

  ```bash title="Aspire CLI"
  aspire add
  ```

- Finds an AppHost project and adds the **kafka** (Aspire.Hosting.Kafka) integration package:

  ```bash title="Aspire CLI"
  aspire add kafka --version 13.3.0
  ```

- Add the **redis** integration to a TypeScript AppHost and regenerate `.aspire/modules/`:

  ```bash title="Aspire CLI"
  aspire add redis --apphost './apphost.mts'
  ```