# atmos list workflows

Use this command to list all workflows defined in your project's workflow manifests. View workflow names, descriptions, and source files to discover automation available for your infrastructure.

## Usage

```shell
atmos list workflows [flags]
```

## Description

The `atmos list workflows` command helps you inspect all Atmos workflows defined in your project's workflow manifests. It provides a tabular view where:

- Each row represents a workflow
- Columns show the file, workflow name, and description

This command is useful for:

- Getting an overview of all available workflows
- Finding workflows for specific tasks
- Understanding workflow organization in your project

## Flags

- **`--file, -f string`**
  Filter workflows by file (e.g., 
  `atmos list workflows -f workflow1`
  )
- **`--format string`**
  Output format: 
  `table`
  , 
  `json`
  , 
  `yaml`
  , 
  `csv`
  , 
  `tsv`
  . Overrides 
  `workflows.list.format`
   configuration in atmos.yaml (default: 
  `table`
  )
- **`--delimiter string`**
  Delimiter for csv/tsv output (default: 
  `\t`
  )
- **`--columns string`**
  Columns to display (comma-separated). Overrides 
  `workflows.list.columns`
   configuration in atmos.yaml
- **`--sort string`**
  Sort by column:order (e.g., 
  `name:asc,file:desc`
  )

## Examples

List all workflows:

```shell
atmos list workflows
```

Filter workflows by file:

```shell
atmos list workflows -f networking.yaml
```

Output in different formats:

```shell
# JSON format for machine processing
atmos list workflows --format json

# YAML format for configuration files
atmos list workflows --format yaml

# CSV format for spreadsheet compatibility
atmos list workflows --format csv

# TSV format with tab delimiters
atmos list workflows --format tsv
```

Specify delimiter for CSV output:

```shell
atmos list workflows --format csv --delimiter ','
```

## Example Output

```shell
> atmos list workflows
┌────────────────┬─────────────────────────────┬─────────────────────────────────────────┐
│      File      │          Workflow           │               Description               │
├────────────────┼─────────────────────────────┼─────────────────────────────────────────┤
│ compliance.yaml│ deploy/aws-config/global    │ Deploy AWS Config Global                │
│ networking.yaml│ apply-all-components        │ Apply all networking components         │
│ networking.yaml│ plan-all-vpc                │ Plan all VPC changes                    │
│ datadog.yaml   │ deploy/datadog-integration  │ Deploy Datadog integration              │
└────────────────┴─────────────────────────────┴─────────────────────────────────────────┘
```

:::tip

- Use the `--file` flag to filter workflows from a specific manifest file
- The `describe workflows` command provides more detailed information about workflows
  :::

## Configuration

You can customize the default output format and columns displayed by `atmos list workflows` in your `atmos.yaml`:

### Default Format

```yaml
# atmos.yaml
workflows:
  list:
    format: table  # Default format: table, json, yaml, csv, tsv
```

**Precedence**: CLI `--format` flag > Config file > Environment variable `ATMOS_LIST_FORMAT` > Default (`table`)

### Custom Columns

```yaml
# atmos.yaml
workflows:
  list:
    format: table
    columns:
      - name: Workflow
        value: "{{ .name }}"
      - name: File
        value: "{{ .file }}"
      - name: Description
        value: "{{ .description }}"
      - name: Steps
        value: "{{ .steps | len }} steps"
```

### Available Template Fields

Column `value` fields support Go template syntax with access to:

- `.name` - Workflow name
- `.file` - Workflow definition file path
- `.description` - Workflow description
- `.steps` - Array of workflow steps
- `.stack` - Stack name (if workflow is stack-specific)

### Template Functions

Columns support template functions for data transformation:

```yaml
workflows:
  list:
    columns:
      - name: Workflow (Upper)
        value: "{{ .name | upper }}"
      - name: Short File
        value: "{{ .file | truncate 30 }}"
      - name: Step Count
        value: "{{ .steps | len }}"
      - name: Has Description
        value: "{{ if .description }}Yes{{ else }}No{{ end }}"
```

Available functions:

- `upper`, `lower` - String case conversion
- `truncate` - Truncate string with ellipsis
- `len` - Length of arrays/strings
- `join` - Join array elements with delimiter
- `toString` - Convert value to string
- `ternary` - Conditional expression

### Override Columns via CLI

Override configured columns using the `--columns` flag:

```shell
# Display only name and file columns
atmos list workflows --columns name,file

# Display custom subset
atmos list workflows --columns "name,file,description"
```
