# shdctl manifest commands

> Initialize, validate, and inspect the shdctl manifest schema.

The `manifest` command group manages the `manifest.yaml` file. For the field reference and annotated example, refer to [Manifest reference](../manifest).

## init

Generate a new manifest interactively:

```sh
shdctl manifest init
```

This walks you through the release version, the source registry, the app domain, namespace and image pull secret, autoscaling, the registry your cluster pulls images from (and its namespace, when that is not the source registry), storage classes, monitoring, sizing, the Traefik service type and, optionally, ArgoCD. The command validates the result against the embedded CUE schema before it writes the file, and asks before it overwrites an existing one. It doesn't ask for `deployment.argocd.pathPrefix`: add it to the manifest, or pass `--argocd-path-prefix`, before you run `release generate --format argocd`.

**Parameters:**

* `--output`, `-o`: Output path (default: `./manifest.yaml`)

## validate

Validate an existing manifest against the embedded CUE schema:

```sh
shdctl manifest validate
shdctl manifest validate --file path/to/manifest.yaml
shdctl manifest validate --manifest path/to/manifest.yaml
```

Catches missing required fields, disallowed values, cross-field rules (for example, `maxReplicas >= minReplicas`, or a TLS certificate required when TLS is enabled), and keys the schema does not define — the one check no other command makes.

**Parameters:**

* `--file`, `-f`: Path to the manifest to validate (default: auto-discover). The global `--manifest` names the file too, so use whichever you already have in your pipeline. Passing both with different paths is an error

## schema

Display the embedded CUE schema:

```sh
shdctl manifest schema
```

The schema is the **complete** field list of the shdctl you run it with — every type, default, constraint, and cross-field rule — where the annotated example in the [Manifest reference](../manifest) covers the most common fields. Three defaults it prints are not applied when you leave the field out, so set those fields explicitly: `artifactSync.sourceRepository` (every `artifact sync` subcommand fails without it), `artifactSync.concurrency` (the sync runs one at a time) and `deployment.argocd.destinationServer` (`release generate --format argocd` fails without it).

Export the CUE schema for standalone validation outside shdctl, useful in CI without installing shdctl:

```sh
shdctl manifest schema --export manifest.cue
```

After exporting, validate any manifest against it with the `cue` CLI:

```sh
cue vet manifest.cue manifest.yaml -d '#Manifest'
```
