> ## Documentation Index
> Fetch the complete documentation index at: https://libops-renovate-github-com-libops-sitectl-0-x.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# validate

> Validate the active context's configuration and project layout.

Run `validate` to catch configuration and project layout problems before they
become runtime failures. It combines core sitectl checks with plugin-specific
configuration checks in a single report.

## Reference

Validate the active context's configuration and project layout.

Core checks include: required context fields, compose project presence,
context file accessibility, override symlink, and Docker socket access.

If the active context's plugin registers a validate handler, plugin-specific
checks (e.g. Drupal rootfs path, component state consistency) are also run
and merged into the report.

All flags not consumed by sitectl itself are forwarded to the plugin's
validate handler, allowing plugin-specific flags such as `--codebase-rootfs`.

Exits non-zero if any check fails.

Examples:
sitectl validate
sitectl validate `--format` table
sitectl validate `--codebase-rootfs` drupal/rootfs

```bash theme={null}
sitectl validate [flags]
```

## Output formats

The `--format` flag controls how the report is rendered:

| Format    | Description                       |
| --------- | --------------------------------- |
| `section` | Human-readable sections (default) |
| `table`   | Compact table                     |
| `json`    | Machine-readable JSON             |
| `yaml`    | Machine-readable YAML             |

## When to run it

* After `sitectl config set-context` to verify the new context is wired correctly.
* Before deploying to confirm component state is consistent.
* When `sitectl compose up` fails with an unexpected error — validate often points to the root cause.

## Plugin validators

If the active context's plugin registers a validate handler, its checks are merged automatically into the same report. For the ISLE plugin this includes: Drupal rootfs path, Traefik configuration, and per-component drift state.

Plugin-specific flags such as `--codebase-rootfs` are promoted into typed RPC params when the core contract owns them. Other plugin-specific flags are passed through to the plugin's validator unchanged.
