Skip to content

Theming and output

Every command that prints something accepts -o / --output:

ModeBehaviour
table (default)Styled table using the active theme
jsonMachine-readable JSON on stdout
Terminal window
deckctl source list -o json
deckctl template list --source work -o json
deckctl template variables go-service --source work -o json
deckctl cache list -o json
deckctl history list -o json
deckctl validate -o json

JSON goes to stdout; warnings, prompts and diagnostics go to stderr, so piping into jq is safe:

Terminal window
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.

A theme is a named four-colour palette used to style tables:

SlotTypical role
primaryTable body text
secondaryHeaders
accentHighlights
mutedBorders 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: solarized

If the file doesn’t exist, deckctl uses a built-in default palette.

Terminal window
# Add
deckctl theme add --name solarized \
--primary "#93a1a1" \
--secondary "#268bd2" \
--accent "#b58900" \
--muted "#586e75"
# Add interactively (prompts for each colour)
deckctl theme add
# Inspect
deckctl theme list
deckctl theme get solarized
deckctl theme active
# Switch
deckctl theme set solarized
# Remove
deckctl theme remove --name solarized
deckctl theme remove --name solarized --auto-approve
  • Colours must be hex — #rgb or #rrggbb. Anything else fails validation.
  • All four slots are required on every theme.
  • Theme names must be unique.
  • active must name a theme that exists in the list.

Check a hand-edited file with:

Terminal window
deckctl validate --target themes
Terminal window
deckctl theme list --theme ./ci-themes.yaml
DECKCTL_THEME=./ci-themes.yaml deckctl theme list

The --theme flag takes precedence over DECKCTL_THEME, which takes precedence over ~/.config/deckctl/themes.yaml.