## 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 `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 (`gcluster explain` with no arguments)**: lists all available blueprint paths, schedulers, machine types, storage options, and top-level embedded modules.
- **Blueprint mode (`gcluster explain BLUEPRINT_FILE`)** : displays required Google Cloud APIs, customizable variables in the `vars` block, deployment groups and their modules, and the deployment command.
- **Module mode (`gcluster explain MODULE_PATH`)** : accepts a full embedded module path (such as `modules/file-system/managed-lustre`) or a short module name (such as `managed-lustre` or `filestore`), and displays required Google Cloud APIs, a ready-to-copy `use` snippet, auto-filled inputs, required and optional settings, and module outputs.
- **Specification search mode (`gcluster explain KEYWORD ...`)** : matches hardware, scheduler, or storage keywords (for example, `slurm a3u lustre` or `gke a4`) to the closest turnkey blueprint and generates module snippets for any 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 to override blueprint variables and backend configuration when you inspect a blueprint. This flag is valid only in blueprint mode. If you omit the `-d` flag, then `gcluster explain` automatically loads a companion `BLUEPRINT_NAME-deployment.yaml` file in the same directory if one exists.

## 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:` 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
```