User config
User-level DWE preferences live outside any project, in a flat key = value file. They are read by every dwe invocation regardless of the current working directory and never tracked by git.
Settings cover preferences that are inherently personal — preferred language, mermaid theme for the docs TUI, desktop-notification gates, and overrides for the absolute paths of external binaries (docker, git, dwe, shell, mmdc). Nothing here belongs in a project’s workspace.yml, defaults.yml, or local.yml — those carry project shape, not per-developer machine state.
Contents
Section titled “Contents”File locations
Section titled “File locations”Two files are read in this precedence order (lower → higher), then env vars on top:
-
Global user config at
~/.config/dwe/configon every OS (Linux, macOS, Windows). One path everywhere — no platform-native location, no XDG fallback. Missing file is silently treated as empty. If DWE ever writes it, mode is0600. -
Per-project override at
<project>/.dwe/config. The.dwe/directory is already gitignored by DWE; this file is meant for a developer to pin overrides for a single project without touching the global file. Missing file is silently treated as empty. -
Environment variables override both files.
A parser error in either file bubbles up as a warning (notifications get disabled for that run, locale and theme fall back to defaults). The operation itself is never blocked by a malformed user config.
Syntax
Section titled “Syntax”Flat key = value lines:
- Full-line
#comments only — inline#comments are a parse error (a#after a space or tab inside the value is rejected; a bare#without a preceding space is allowed for fragments like URLs). - Blank lines are ignored.
- Keys use lowercase letters, digits, and underscores. Dotted keys are rejected — use
notify_telegram_token, notnotify.telegram.token. - Booleans:
1/true/yesare truthy;0/false/noare falsy. - Lists: comma-separated, whitespace around items is trimmed.
- Unknown keys are warnings, not errors.
Binary overrides
Section titled “Binary overrides”Override the absolute path DWE uses when invoking an external binary. Useful when the tool lives in a non-standard location or you want to pin a specific version per project.
| Key | Default | Used for |
|---|---|---|
binary_docker | docker | every Docker / Compose call |
binary_git | git | git-aware operations (render git hooks, status probes) |
binary_dwe | dwe | self-references emitted by DWE (e.g. tip lines, generated wrapper scripts) |
binary_shell | sh | the shell used to evaluate when: predicates and embedded scripts |
binary_mmdc | mmdc | mermaid diagram rendering in the dwe docs TUI |
The pattern binary_<name> = <absolute path> also feeds the runtime linter validators — any binary an env/runtime check looks up (shellcheck, yamllint, etc.) can be overridden the same way.
Note: deploy and condition step
when:predicates intentionally use hardcodedshfor portability and ignorebinary_shell. The override applies to every other shell invocation.
Empty paths are rejected at parse time. Missing files / non-executable paths surface as diagnostics from dwe validate (severity error) with a hint pointing back at the override entry.
binary_docker = /opt/homebrew/bin/dockerbinary_git = /usr/local/bin/gitbinary_mmdc = /Users/me/.npm-global/bin/mmdcLanguage
Section titled “Language”| Key | Type | Default | Purpose |
|---|---|---|---|
language | string | unset → $LANG → en | Preferred locale for translated strings |
Two-letter language code (en, ru, de, …). Controls the locale resolution used by user commands, UI strings, and dwe docs. See Localization (i18n) for the full resolution ladder and per-namespace fallback rules.
Mermaid theme
Section titled “Mermaid theme”| Key | Type | Default | Purpose |
|---|---|---|---|
mermaid_theme | enum | auto | Theme used when rendering mermaid diagrams in the dwe docs TUI |
Valid values: auto (follow the terminal background), dark, light. Empty string also resolves to auto. Any other value is a parse error.
Notifications
Section titled “Notifications”The notification-related keys (notify_enabled, notify_run_enabled, notify_deploy_enabled, notify_commands_enabled, notify_channels) live in this same file. They are documented in detail — together with the gate matrix, non-interactive detection, and the per-OS notification backends — in Notifications.
Environment variables
Section titled “Environment variables”Each typed key has a matching DWE_<UPPER_SNAKE> env var that overrides whatever the files set:
| Env var | Overrides |
|---|---|
DWE_LANGUAGE | language |
DWE_MERMAID_THEME | mermaid_theme |
DWE_NOTIFY_ENABLED | notify_enabled |
DWE_NOTIFY_RUN_ENABLED | notify_run_enabled |
DWE_NOTIFY_DEPLOY_ENABLED | notify_deploy_enabled |
DWE_NOTIFY_COMMANDS_ENABLED | notify_commands_enabled |
DWE_NOTIFY_CHANNELS | notify_channels |
Binary overrides have no env-var equivalent — set them in the config file.
Precedence
Section titled “Precedence”embedded defaults → global ~/.config/dwe/config → per-project <project>/.dwe/config → environment variablesLater layers win. Maps merge per-key; list-valued keys (notify_channels) replace wholesale.
Sample config
Section titled “Sample config”# ~/.config/dwe/config — same path on every OS
# Locale and TUIlanguage = rumermaid_theme = dark
# Binary overridesbinary_docker = /opt/homebrew/bin/dockerbinary_mmdc = /Users/me/.npm-global/bin/mmdc
# Notifications: loud on deploy, quiet during inner-loop runnotify_enabled = truenotify_deploy_enabled = truenotify_run_enabled = falsenotify_commands_enabled = truenotify_channels = nativeA per-project file that pins only one knob differently:
# <project>/.dwe/config
notify_run_enabled = false