> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ankra.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# ankra stack-profiles

> Manage reusable stack profiles

## ankra stack-profiles

List, export, and import organisation-level stack profiles.

## ankra stack-profiles apply

Apply (instantiate) a stack profile onto a cluster.

By default this creates a reviewable stack DRAFT on the target cluster - nothing is
deployed until you review it in the Ankra dashboard or pass --deploy.

Bind profile parameters with --set name=value. For secret parameters prefer
\--set-file name=path or --set-env name=ENV\_VAR so the value never appears in your
shell history or process list. Use 'ankra stack-profiles get \<profile-id>' to see
which parameters a profile expects.

```bash theme={null}
ankra stack-profiles apply [profile-id] [flags]
```

**Flags**

| Flag             | Default | Description                                                                            |
| ---------------- | ------- | -------------------------------------------------------------------------------------- |
| `--cluster`      |         | Target cluster name or ID (defaults to the selected cluster)                           |
| `--deploy`       | `false` | Deploy the stack immediately instead of leaving a draft for review                     |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable)                                  |
| `--set`          | `[]`    | Bind a parameter: name=value (repeatable; not for secrets)                             |
| `--set-env`      | `[]`    | Bind a parameter from an environment variable: name=ENV\_VAR (repeatable; secret-safe) |
| `--set-file`     | `[]`    | Bind a parameter from a file: name=path (repeatable; secret-safe)                      |
| `--stack-name`   |         | Name for the new stack (defaults to the profile's stack name)                          |
| `--version`      | `0`     | Profile version to apply (defaults to the profile's current version)                   |

## ankra stack-profiles export-iac

Export a profile version as ClusterInfrastructureAsCode YAML

```bash theme={null}
ankra stack-profiles export-iac [profile-id] [flags]
```

**Flags**

| Flag             | Default | Description                               |
| ---------------- | ------- | ----------------------------------------- |
| `-o`, `--output` |         | Write YAML to this file instead of stdout |
| `--version`      | `1`     | Profile version to export                 |

## ankra stack-profiles get

Describe a stack profile: its metadata, published versions, and the parameters you can bind when applying it.

```bash theme={null}
ankra stack-profiles get [profile-id] [flags]
```

**Flags**

| Flag             | Default | Description                                                   |
| ---------------- | ------- | ------------------------------------------------------------- |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable)         |
| `--version`      | `0`     | Profile version to describe (defaults to the current version) |

## ankra stack-profiles import

Import a profile from a ClusterInfrastructureAsCode YAML file

```bash theme={null}
ankra stack-profiles import [file] [flags]
```

**Flags**

| Flag         | Default   | Description                                          |
| ------------ | --------- | ---------------------------------------------------- |
| `--category` | `general` | Profile category                                     |
| `--name`     |           | Profile name (defaults to metadata.name in the file) |

## ankra stack-profiles list

List stack profiles in the active organisation

```bash theme={null}
ankra stack-profiles list [flags]
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |
| `--page`         | `1`     | Page number                                           |
| `--page-size`    | `25`    | Page size                                             |
| `--search`       |         | Filter profiles by name                               |
