# atmos workflow

Use this command to perform sequential execution of `atmos` and `shell` commands defined as workflow steps.

_\[Video: atmos workflow]_

**Configure Workflows**

Learn how to configure workflow paths and define workflow manifests in your atmos.yaml.

Configuration Reference[Read more](/cli/configuration/workflows)

**Step Types Reference**

Explore 20+ step types for building interactive workflows including prompts, spinners, tables, and more.

Step Types Reference[Read more](/workflows#step-types)

## Usage

An Atmos workflow is a series of steps that are run in order to achieve some outcome. Every workflow has a name and is
easily executed from the
command line by calling `atmos workflow`. Use workflows to orchestrate any number of commands. Workflows can call
any `atmos` subcommand (including
[Atmos Custom Commands](/cli/configuration/commands)), shell commands, and have access to the stack configurations.

:::note
You can use [Atmos Custom Commands](/cli/configuration/commands) in [Atmos Workflows](/workflows),
and [Atmos Workflows](/workflows)
in [Atmos Custom Commands](/cli/configuration/commands)
:::

## Examples

### Run a Workflow by Name

The simplest way to run a workflow is by name. Atmos will find it automatically:

```shell
# Run the "deploy" workflow
atmos workflow deploy

# Run the "plan-all-vpc" workflow
atmos workflow plan-all-vpc
```

### Interactive Workflow Selection

If multiple workflows share the same name across different workflow files, Atmos will present an interactive selector:

```shell
# If "deploy" exists in both networking.yaml and database.yaml,
# Atmos will prompt you to choose which one to run
atmos workflow deploy
```

### Explicit File Selection

Use the `--file` / `-f` flag to explicitly select which workflow file to use:

```shell
# Run "deploy" from the networking workflow file
atmos workflow deploy --file networking

# Short form
atmos workflow deploy -f networking

# Run with dry-run to preview steps
atmos workflow apply-all-components -f networking --dry-run

# Start from a specific step
atmos workflow test-1 -f workflow1 --from-step step2
```

### Interactive UI

Just run `atmos workflow` without arguments to start an interactive UI to view, search, and execute workflows:

```shell
atmos workflow
```

- Use the `right/left` arrow keys to navigate between the "Workflow Manifests", "Workflows" and the selected workflow
  views

- Use the `up/down` arrow keys (or the mouse wheel) to select a workflow manifest and a workflow to execute

- Use the `/` key to filter/search for the workflow manifests and workflows in the corresponding views

- Press `Enter` to execute the selected workflow from the selected workflow manifest starting with the selected step

### Execute a Workflow

### Run Any Workflow Step

Use the `Tab` key to flip the 3rd column view between the selected workflow steps and full workflow definition.
For example:

:::tip
Run `atmos workflow --help` to see all the available options
:::

## Arguments

- **`workflow_name`**
  Workflow name

## Flags

- **`--file` / `-f` (optional)**
  File name where the workflow is defined. If omitted and the workflow name is unique, Atmos finds it automatically. If multiple workflows share the same name, Atmos presents an interactive selector.
- **`--stack` / `-s` (optional)**
  Atmos stack (if provided, will override stacks defined in the workflow or workflow steps).
- **`--from-step` (optional)**
  Start the workflow from the named step.
- **`--dry-run` (optional)**
  Dry run. Print information about the executed workflow steps without executing them.
