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

# validate

> Validate `cirron.yaml`, or every model in a workspace.

# cirron validate

Validates Cirron configuration. The behavior depends on the `cirron.yaml` found in the
current directory:

* **Single-model mode**: the `cirron.yaml` is a normal model config. `validate` checks
  its required fields, framework, and version format.
* **Monorepo mode**: the `cirron.yaml` has a top-level `workspace:` key. `validate`
  checks the root config, discovers every model listed under `workspace.models`
  (expanding globs like `models/*`), applies any `workspace.defaults`, and validates each
  model. Results are reported per model.

There is no upward search for a root config. Running `cirron validate` inside a model
subdirectory of a monorepo validates just that model.

## Usage

```bash theme={null}
cirron validate [options]
```

## Options

| Option              | Description                                                                                            | Default    |
| ------------------- | ------------------------------------------------------------------------------------------------------ | ---------- |
| `--model <name...>` | Validate only the named model(s). Matches a model's `name` or its workspace-relative path. Repeatable. | all models |
| `--json`            | Output results as JSON                                                                                 | `false`    |

## Exit code

`0` if everything is valid; `1` if the root config is invalid, a model path is missing,
a `--model` name matched nothing, or any model fails validation.

## Examples

### Single model

```bash theme={null}
cirron validate
```

```
PASS sentiment-rnn (.)
Configuration is valid.
```

### Whole workspace

```bash theme={null}
cirron validate
```

```
Workspace: ml-models
PASS sentiment-rnn (models/sentiment-rnn)
PASS news-classifier (models/news-classifier)
PASS embedder (models/embedder)

All 3 model(s) valid.
```

### A subset of models

```bash theme={null}
cirron validate --model sentiment-rnn --model embedder
```

### A missing model path

```
Workspace: ml-models
  error  model path not found or has no cirron config: models/gone
PASS sentiment-rnn (models/sentiment-rnn)

1/1 model(s) valid; workspace validation failed.
```

### JSON output

```bash theme={null}
cirron validate --json
```

```json theme={null}
{
  "workspace": "ml-models",
  "ok": true,
  "rootErrors": [],
  "missing": [],
  "unmatched": [],
  "models": [
    { "name": "sentiment-rnn", "path": "models/sentiment-rnn", "ok": true, "errors": [], "warnings": [] }
  ]
}
```

In single-model mode the JSON shape is `{ "name", "ok", "errors", "warnings" }`.

## See also

* [Monorepo support](/cli/monorepo): the root `workspace:` config and inheritance rules.
* [`cirron lint`](/cli/commands/lint): deeper project-health checks (structure, dependencies, code).
