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

# Validate

Validate a local config instance file against a persisted config schema.

### API key scopes

If validating from a [CI pipeline](/developers/ci/overview), the following API key scope is required when selecting a schema by ID:

* `config_schemas:read`

When selecting a schema with `--release` and `--config-type`, the following API key scopes are required:

* `config_schemas:read`
* `releases:read`

### Usage

<Tabs>
  <Tab title="Schema ID">
    ```bash theme={null}
    miru config validate {file} \
      --schema-id {config-schema-id}
    ```
  </Tab>

  <Tab title="Release and config type">
    ```bash theme={null}
    miru config validate {file} \
      --release {release-version} \
      --config-type {config-type}
    ```
  </Tab>
</Tabs>

<Tip>
  Use `sudo miru ...` to read config files from restricted paths.
</Tip>

**Arguments**

<ParamField path="file" type="string" required>
  Local config instance file to validate.

  Examples: `./robot.json`, `./configs/mobility.json`
</ParamField>

**Flags**

<ParamField path="--schema-id" type="string">
  Full config schema ID to validate against. Dashboard short IDs are not accepted.

  Mutually exclusive with `--release` and `--config-type`.

  Examples: `cfg_sch_7xKqW1mZ3nBvTgL5cRs9dYuP`
</ParamField>

<ParamField path="--release" type="string">
  Release version used to find the config schema for `--config-type`.

  Required when `--config-type` is provided. Mutually exclusive with `--schema-id`.

  Examples: `v1.2.0`
</ParamField>

<ParamField path="--config-type" type="string">
  Config type slug or name within the selected release.

  Required when `--release` is provided. Mutually exclusive with `--schema-id`.

  Examples: `motion-control`, `Motion Control`
</ParamField>

### Examples

<CodeGroup>
  ```bash Schema ID theme={null}
  $ miru config validate ./robot.json \
    --schema-id cfg_sch_7xKqW1mZ3nBvTgL5cRs9dYuP

  ✓ Config Valid
  ```

  ```bash Release and config type theme={null}
  $ miru config validate ./robot.json \
    --release v1.2.0 \
    --config-type motion-control

  ✓ Config Valid
  ```
</CodeGroup>
