Theming and output
Output modes
Section titled “Output modes”Every command that prints something accepts -o / --output:
| Mode | Behaviour |
|---|---|
table (default) | Styled table using the active theme |
json | Machine-readable JSON on stdout |
deckctl source list -o jsondeckctl template list --source work -o jsondeckctl template variables go-service --source work -o jsondeckctl cache list -o jsondeckctl history list -o jsondeckctl validate -o jsonJSON goes to stdout; warnings, prompts and diagnostics go to stderr, so
piping into jq is safe:
deckctl template variables go-service --source work -o json \ | jq -r '.[] | select(.default == null) | .name'template apply is the exception: its RENDER / COPY listing and dry-run
output are always plain text.
Themes
Section titled “Themes”A theme is a named four-colour palette used to style tables:
| Slot | Typical role |
|---|---|
primary | Table body text |
secondary | Headers |
accent | Highlights |
muted | Borders and de-emphasised text |
Themes live in ~/.config/deckctl/themes.yaml:
themes: - name: default palette: primary: "#e0def4" secondary: "#9ccfd8" accent: "#c4a7e7" muted: "#6e6a86" - name: solarized palette: primary: "#93a1a1" secondary: "#268bd2" accent: "#b58900" muted: "#586e75"active: solarizedIf the file doesn’t exist, deckctl uses a built-in default palette.
Managing themes
Section titled “Managing themes”# Adddeckctl theme add --name solarized \ --primary "#93a1a1" \ --secondary "#268bd2" \ --accent "#b58900" \ --muted "#586e75"
# Add interactively (prompts for each colour)deckctl theme add
# Inspectdeckctl theme listdeckctl theme get solarizeddeckctl theme active
# Switchdeckctl theme set solarized
# Removedeckctl theme remove --name solarizeddeckctl theme remove --name solarized --auto-approve- Colours must be hex —
#rgbor#rrggbb. Anything else fails validation. - All four slots are required on every theme.
- Theme names must be unique.
activemust name a theme that exists in the list.
Check a hand-edited file with:
deckctl validate --target themesUsing a different themes file
Section titled “Using a different themes file”deckctl theme list --theme ./ci-themes.yamlDECKCTL_THEME=./ci-themes.yaml deckctl theme listThe --theme flag takes precedence over DECKCTL_THEME, which takes precedence
over ~/.config/deckctl/themes.yaml.