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

# cluster list

> List the compute clusters available to your organization

Lists the compute clusters available to your organization. The `Name` column of the output is the value you pass to `--affinity cluster=<cluster_name>` when starting a [training job](/cli/reference/training/run), an [interactive debug-ssh session](/cli/reference/training/debug-ssh), or an [inference endpoint](/cli/reference/inference/serve).

## Usage

```bash theme={null}
flexai cluster list [flags]
```

## Flags

| Flag     | Short | Type    | Description                                                                     |
| -------- | ----- | ------- | ------------------------------------------------------------------------------- |
| `--help` | `-h`  | boolean | Displays this help page.                                                        |
| `--json` | `-j`  | boolean | Displays cluster information in JSON format instead of the default ASCII table. |

## Output

Each row in the output represents one cluster:

| Column    | Description                                                                                                              |
| --------- | ------------------------------------------------------------------------------------------------------------------------ |
| `Name`    | The cluster's identifier. Use this value with `--affinity cluster=<Name>`.                                               |
| `Status`  | The current operational status of the cluster.                                                                           |
| `Default` | `true` if this is the cluster FlexAI selects when no `--affinity` is provided and the requested `--device-arch` matches. |
| `Shared`  | `true` if the cluster is shared across multiple organizations; `false` if it is dedicated to your organization.          |

## Examples

### List all available clusters

```text theme={null}
flexai cluster list
```

### List clusters in JSON format

```text theme={null}
flexai cluster list --json
```

### Use a listed cluster name with `--affinity`

```bash theme={null}
flexai training run my-training-job \
  --repository-url https://github.com/flexaihq/nanoGPT/ \
  --affinity cluster=<cluster_name_from_the_list_above> \
  --accels 4 -- train.py
```
