# atmos terraform workdir list

Use this command to list all existing workdirs in your project. The output includes metadata about each workdir such as the component name, stack, source type, and timestamps.

## Usage

```shell
atmos terraform workdir list [flags]
```

## Flags

- **`--format`**
  Output format: 
  `table`
  , 
  `json`
  , or 
  `yaml`
  . Defaults to 
  `table`
  .

## Examples

### List All Workdirs

```shell
# List all workdirs in table format (default)
atmos terraform workdir list
```

Example output:

```
COMPONENT  STACK    TYPE   VERSION  LAST_ACCESSED     PATH
vpc        dev      local  -        2026-01-15 10:30  .workdir/terraform/dev-vpc-bb03116d
vpc        staging  local  -        2026-01-15 11:00  .workdir/terraform/staging-vpc-8ce5e903
vpc        prod     local  -        2026-01-15 12:00  .workdir/terraform/prod-vpc-0e327247
s3-bucket  dev      local  -        2026-01-15 10:35  .workdir/terraform/dev-s3-bucket-e00418a7
```

### Output as JSON

```shell
# List workdirs in JSON format for scripting
atmos terraform workdir list --format json
```

Example output:

```json
[
  {
    "name": "dev-vpc-bb03116d",
    "component": "vpc",
    "stack": "dev",
    "source": "components/terraform/vpc",
    "source_type": "local",
    "path": ".workdir/terraform/dev-vpc-bb03116d",
    "content_hash": "a60bbfad57c32f1d7acd08defd9f0bb7",
    "created_at": "2026-01-15T10:30:00Z",
    "updated_at": "2026-01-15T10:30:00Z",
    "last_accessed": "2026-01-15T10:30:00Z"
  }
]
```

### Output as YAML

```shell
# List workdirs in YAML format
atmos terraform workdir list --format yaml
```

## Understanding the Output

Each workdir entry includes:

- **COMPONENT** - The Terraform component name
- **STACK** - The stack name where this workdir is used
- **TYPE** - The source type (`local` for local components)
- **VERSION** - The provisioned source version, if any (`-` for local components)
- **LAST\_ACCESSED** - When the workdir was last accessed
- **PATH** - The workdir directory path, ending in `<stack>-<component>-<hash>` (the trailing hash keeps two component instances from colliding even when their `<stack>-<component>` prefixes look the same)

## Related Commands

- [`atmos terraform workdir show`](/cli/commands/terraform/workdir/show) - Show details for a specific workdir
- [`atmos terraform workdir describe`](/cli/commands/terraform/workdir/describe) - Output workdir as stack manifest
- [`atmos terraform workdir clean`](/cli/commands/terraform/workdir/clean) - Remove workdirs
