Skip to content

deckctl validate

Handles config validation. Checks the files deckctl reads and reports every problem it finds rather than stopping at the first one.

deckctl validate [flags]

Takes no positional arguments.

FlagDefaultDescription
-t, --target <target>allall, config, themes or sidecar

Plus the global flags.

TargetWhat it checks
configconfig.yaml — source types, required fields, token_env shape, cache_ttl, duplicate names
themesthemes.yaml — hex colours, duplicate names, active pointing at an existing theme
sidecarEvery sidecar in every local source — delimiters, variable types and choices
allAll three

A missing config.yaml or themes.yaml is not an error — deckctl falls back to an empty config and the built-in theme.

Terminal window
deckctl validate
┌────────┬────────────────────────┬────────────────────────────────────────────┐
│ Status │ Source │ Errors │
├────────┼────────────────────────┼────────────────────────────────────────────┤
│ ✓ │ config │ │
│ ✓ │ theme │ │
│ ✓ │ sidecars: local/go-... │ │
│ ✗ │ sidecars: local/broken │ variable of type "choice" requires choi... │
└────────┴────────────────────────┴────────────────────────────────────────────┘

One row per checked artefact. -o json gives the untruncated errors:

Terminal window
deckctl validate -o json
[
{ "Source": "config", "Passed": true, "Errors": null },
{ "Source": "theme", "Passed": true, "Errors": null },
{
"Source": "sidecars: local/broken",
"Passed": false,
"Errors": ["variable of type \"choice\" requires choices to be set"]
}
]

Non-zero when any check fails, with a summary such as 1 validation issue(s) found. That makes it usable directly as a pipeline gate:

Terminal window
deckctl validate -o json

An unknown --target is an error: unknown target "foo" (valid: all, config, themes, sidecar).

Terminal window
deckctl validate
deckctl validate -t config
deckctl validate -t sidecar -o json
deckctl validate --config ./ci/deckctl.yaml --theme ./ci/themes.yaml