Skip to content

Configuration

WhatDefault pathFlagEnvironment variable
Sources config~/.config/deckctl/config.yaml--configDECKCTL_CONFIG
Themes~/.config/deckctl/themes.yaml--themeDECKCTL_THEME
Apply history~/.config/deckctl/history.db--historyDECKCTL_HISTORY
Template cache~/.cache/deckctl/--cache-dirDECKCTL_CACHE_DIR

Precedence is flag → environment variable → default. The cache directory additionally checks XDG_CACHE_HOME (using $XDG_CACHE_HOME/deckctl) before falling back to ~/.cache/deckctl.

Files are created with mode 0640 inside directories created with 0750.

A missing config.yaml or themes.yaml is not an error: deckctl starts with an empty config and its built-in theme.

sources:
- name: local
type: local
path: /home/you/templates
- name: work
type: gitlab
url: https://gitlab.mycompany.com
group: platform/templates
token_env: DECKCTL_WORK_TOKEN
cache_ttl: 24h
default_source: local
KeyTypeDescription
sourceslistThe configured sources
default_sourcestringName of the source to treat as default
FieldRequiredApplies toDescription
nameyesbothUnique identifier, used as --source <name>
typeyesbothlocal or gitlab
pathyeslocalDirectory whose subdirectories are templates
urlyesgitlabInstance base URL, e.g. https://gitlab.com
groupyesgitlabGroup path; nesting allowed (parent/child)
token_envnogitlabName of the env var holding a Personal Access Token
cache_ttlnogitlabHow long a cache entry stays fresh. Default 1h.
  • type must be local or gitlab.
  • name is required, and names must be unique across all sources.
  • gitlab sources require both url and group.
  • local sources require path.
  • token_env must match ^[A-Z_][A-Z0-9_]*$ — it names an environment variable, it does not hold a token.
  • cache_ttl must be non-negative, and cannot be set on a local source.

Check a hand-edited file with deckctl validate -t config.

cache_ttl parses as a Go duration: an optionally-signed decimal with a unit suffix, and units may be combined.

ValidInvalid
30s, 15m, 2h, 1h30m, 0.5h1d, 2w, 24 (no unit)

Tokens are never written to config.yaml. token_env names an environment variable that deckctl reads at runtime:

Terminal window
export DECKCTL_WORK_TOKEN=glpat-xxxxxxxxxxxx

Required scopes: read_api to list projects and tags, read_repository to download archives from private projects.

If token_env is set but the variable is empty or unset, deckctl prints a warning to stderr and continues unauthenticated. If token_env is omitted, no warning is printed.

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
KeyTypeDescription
themeslistNamed palettes
themes[].namestringUnique theme name
themes[].palette.primaryhexBody text
themes[].palette.secondaryhexHeaders
themes[].palette.accenthexHighlights
themes[].palette.mutedhexBorders and de-emphasised text
activestringName of the theme in use
  • All four palette colours are required, and each must match #rgb or #rrggbb. Named colours are not accepted.
  • Theme names must be unique.
  • active, when set, must name a theme present in themes.

Check with deckctl validate -t themes.

VariableEffect
DECKCTL_CONFIGPath to config.yaml
DECKCTL_THEMEPath to themes.yaml
DECKCTL_HISTORYPath to the history database
DECKCTL_CACHE_DIRCache directory
XDG_CACHE_HOMEUsed as $XDG_CACHE_HOME/deckctl when DECKCTL_CACHE_DIR is unset
(your own)Whatever token_env names, per GitLab source