Documentation Subsystem
DWE includes an integrated documentation browser and reference system. Access embedded built-in docs, project-specific docs (when present), render markdown with syntax highlighting, and view mermaid diagrams inline.
- Interactive TUI browser —
dwe docskeys, layout, search - Non-interactive commands —
show,list,search,export,llms-txt,cache clear, plus mermaid configuration andmmdcinstall - Translations and language behavior — locale resolution, file layout, content-hash staleness check
Quick start
Section titled “Quick start”View docs interactively:
dwe docsShow a specific topic in the terminal:
dwe docs show config/services/fieldsdwe docs show config/userconfig#binary-overridesList all available topics:
dwe docs listExport all docs to a directory:
dwe docs export ./my-docsProject docs
Section titled “Project docs”DWE automatically detects and includes documentation from your project’s ./docs/ directory.
When ./docs/ exists, the TUI browser shows a second top-level branch:
DWE concepts/ config/ render/ guides/ READMEProject guides/ examples/If ./docs/ is absent or empty, the Project branch is omitted.
Structure:
<project>/ docs/ guides/ setup.md examples/ docker.md README.mdHot reload: Edit files in ./docs/ while the TUI is open; the viewport updates automatically (press r to manually reload if auto-detect misses an edit).
Configuration reference
Section titled “Configuration reference”mmdc binary override
Section titled “mmdc binary override”Path or name of the mermaid-cli executable. Defaults to mmdc (searched on $PATH).
This is overridden in the user-config file (~/.config/dwe/config, or .dwe/config in a project) as a flat binary_mmdc key — not in workspace.yml:
binary_mmdc = /usr/local/bin/mmdc # Absolute path; omit to use `mmdc` on $PATH (default)See config/userconfig for the full binary-override list.
docs.mermaid
Section titled “docs.mermaid”Mermaid rendering mode. One of:
auto— Render ifmmdcavailable; fall back to raw blocks if missing (default)mmdc— Requiremmdc; error placeholder if missingoff— Never render; always show raw mermaid blocks
Default: auto
docs: mermaid: auto # Default mermaid: mmdc # Strict mode mermaid: off # Disableddocs.cache_size_mb
Section titled “docs.cache_size_mb”Maximum size of the mermaid diagram cache in MB. Defaults to 100.
docs: cache_size_mb: 50 # 50 MB cache cache_size_mb: 500 # 500 MB cacheOnce the cache exceeds this limit, oldest diagrams are automatically deleted (LRU eviction).
Related commands
Section titled “Related commands”dwe docs generate— Generate markdown documentation from user commandsdwe validate— Check for documentation errors and orphan translation entriesdwe commands list— List user commands with translated descriptions