## NAME

`gcluster explain` - discovers and inspects blueprints, embedded modules, and
cluster specifications offline.

## SYNOPSIS

```
gcluster explain [MODULE_OR_BLUEPRINT_OR_SPECS...] [FLAGS]
```

## DESCRIPTION

> [!NOTE]
> **Note:** The `gcluster explain` command requires Cluster Toolkit version `v1.108.0` or later.

The `gcluster explain` command lets you discover and inspect
Cluster Toolkit blueprints and embedded modules offline. It reads
embedded module metadata and local blueprint files directly without making
Google Cloud API calls or requiring cloud credentials. You can run
`gcluster explain` in the following modes:

- **Index mode.** Run `gcluster explain` with no arguments to list available blueprints---including schedulers, machine types, accelerators, workload tags, and storage options---and embedded modules. Core modules appear before community modules.
- **Blueprint mode.** Pass a blueprint YAML file, a companion deployment file such as `hpc-slurm-deployment.yaml`, or a directory containing a single blueprint. This mode displays required Google Cloud APIs, `vars` settings and global deployment variables, deployment groups and modules, and the deployment command.
- **Module mode.** Pass an embedded module path such as `modules/file-system/managed-lustre` or a short name such as `managed-lustre`. This mode displays required Google Cloud APIs, a `use` snippet, auto-filled inputs, module outputs, and `lifecycle` rules for ignored changes. It also lists required, optional, and deprecated settings with their variable types and validation rules.
- **Specification search mode.** Pass hardware, accelerator, workload, scheduler, or storage keywords, such as `slurm a3u lustre` or `gke a4`. This mode finds the closest turnkey blueprint, notes any tied matches, and generates module snippets for additional requested capabilities.

## FLAGS

- `-f`, `--format FORMAT`: Sets the output format to `text`, `yaml`, or `json`. The default value is `text`.
- `-d`, `--deployment-file DEPLOYMENT_FILE`: A deployment
  file that overrides blueprint variables and backend configuration. This flag
  is valid only in blueprint mode.

  If you omit this flag, then `gcluster explain` searches the blueprint's
  directory and loads the first file that matches one of the following
  patterns:
  - `NAME-deployment.yaml` or `NAME_deployment.yaml`, where `NAME` is the base name of the blueprint file or the `blueprint_name` value.
  - `PREFIX-deployment.yaml` or `PREFIX_deployment.yaml`, where `PREFIX` is the base name of the blueprint file without a `-blueprint`, `-advanced`, `-infra`, or `-experiment` suffix.
  - The literal filename `deployment.yaml`.

## EXAMPLES

To list all available blueprints and embedded modules:

```bash
gcluster explain
```

To inspect the required APIs, customizable variables, and module topology of a
blueprint:

```bash
gcluster explain examples/hpc-slurm.yaml
```

To inspect an embedded module's inputs, outputs, and `use:` field compatibility
in JSON format:

```bash
gcluster explain modules/file-system/managed-lustre --format json
```

To find the best matching blueprint for a Slurm cluster with A3 Ultra GPUs and
Google Cloud Managed Lustre:

```bash
gcluster explain slurm a3u lustre
```