# atmos stack

Create stack manifests, edit configuration, and plan, test, deploy, or destroy components across component types.
Atmos finds the manifest that defines a value and edits it while preserving comments, anchors, and templates.

:::note Editing shared configuration
A value may come from an imported manifest shared by multiple stacks. Editing that manifest can affect every stack that imports it. Review the defining file before changing a value, or use `--file` to target a specific manifest.
:::

## Usage

[`atmos stack config get|set|delete|format|list`](/cli/commands/stack/config) is
the **canonical** command set. The flat commands documented below (`get`, `set`,
`delete`, `format`) are deprecated, hidden aliases of the matching `stack config` subcommand. They retain their existing behavior until a breaking release; `stack delete` does not yet remove manifests.
`atmos stack config list` lists editable configuration paths. Use
[`atmos stack list`](/cli/commands/stack/stack-list) to list stacks,
[`atmos stack describe`](/cli/commands/stack/stack-describe) to inspect their resolved configuration,
and [`atmos stack instances`](/cli/commands/stack/stack-instances) to list component instances.

```shell
atmos stack list
atmos stack describe --stack dev
atmos stack instances --stack dev
atmos stack create --file stacks/deploy/dev.yaml
atmos stack plan --stack dev --component=network,app
atmos stack test --stack dev --component=network,app
atmos stack deploy --affected --stack dev --dry-run
atmos stack destroy --all --stack dev --dry-run
atmos stack config get <path> -s <stack> -c <component>
atmos stack config set <path> <value> -s <stack> -c <component> [--type <type>] [--file <manifest>]
atmos stack config delete <path> -s <stack> -c <component> [--file <manifest>]
atmos stack config format -s <stack> -c <component> [--file <manifest>]
atmos stack config list [path-pattern] -s <stack> -c <component> [--format <format>]
atmos stack schema [output-path]
atmos stack validate
```

Paths are component-relative (e.g. `vars.region`, `settings.spacelift.workspace_enabled`).

## Subcommands

- [`atmos stack list`](/cli/commands/stack/stack-list) — alias of `atmos list stacks`.

- [`atmos stack describe`](/cli/commands/stack/stack-describe) — alias of `atmos describe stacks`.

- [`atmos stack instances`](/cli/commands/stack/stack-instances) — alias of `atmos list instances`.

- [`atmos stack create`](/cli/commands/stack/stack-create) — create a new manifest.

- [`atmos stack plan`](/cli/commands/stack/stack-plan) — run native component plans or diffs in dependency order.

- [`atmos stack test`](/cli/commands/stack/stack-test) — run registered component tests in dependency order.

- [`atmos stack deploy`](/cli/commands/stack/stack-deploy) — deploy registered component handlers in dependency order.

- [`atmos stack destroy`](/cli/commands/stack/stack-destroy) — destroy current components in reverse dependency order.

- [`atmos stack config`](/cli/commands/stack/config) — the canonical `get`/`set`/`delete`/`format`/`list` command set.

- [`atmos stack get`](/cli/commands/stack/stack-get) — deprecated alias of [`atmos stack config get`](/cli/commands/stack/config/get): read a value and show where it resolves from.

- [`atmos stack set`](/cli/commands/stack/stack-set) — deprecated alias of [`atmos stack config set`](/cli/commands/stack/config/set): set a value in the manifest that defines it.

- [`atmos stack delete`](/cli/commands/stack/stack-delete) — deprecated alias of [`atmos stack config delete`](/cli/commands/stack/config/delete): delete a value from the manifest that defines it.

- [`atmos stack format`](/cli/commands/stack/stack-format) — deprecated alias of [`atmos stack config format`](/cli/commands/stack/config/format): format the manifest files that define a component.

- [`atmos stack schema`](/cli/commands/stack/stack-schema) — print the stack-manifest JSON Schema.

- [`atmos stack validate`](/cli/commands/stack/stack-validate) — validate stack manifests. Alias of [`atmos validate stacks`](/cli/commands/validate/stacks).

## Examples

```shell
# Read a value and see which manifest defines it.
atmos stack config get vars.region -s plat-ue2-prod -c vpc

# Set the value in the file that currently provides it.
atmos stack config set vars.region us-west-2 -s plat-ue2-prod -c vpc

# Target a specific manifest explicitly (also used to create new keys).
atmos stack config set vars.new_flag true --type=bool -s plat-ue2-prod -c vpc --file stacks/deploy/prod.yaml

# Format the manifest files that define a component.
atmos stack config format -s plat-ue2-prod -c vpc

# List every editable path for a component (canonical form only, no flat alias).
atmos stack config list -s plat-ue2-prod -c vpc

# Print the stack-manifest JSON Schema.
atmos stack schema
```

## How file resolution works

For `set` and `delete`, Atmos describes the component with provenance tracking and
looks up the source file of the effective (post-merge) value. When a value is not
defined anywhere, or is inherited from a base component under a different key, the
command reports where the value resolves and asks you to pass `--file` to choose the
manifest explicitly.
