Skip to content

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.

View docs interactively:

Terminal window
dwe docs

Show a specific topic in the terminal:

Terminal window
dwe docs show config/services/fields
dwe docs show config/userconfig#binary-overrides

List all available topics:

Terminal window
dwe docs list

Export all docs to a directory:

Terminal window
dwe docs export ./my-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/
README
Project
guides/
examples/

If ./docs/ is absent or empty, the Project branch is omitted.

Structure:

<project>/
docs/
guides/
setup.md
examples/
docker.md
README.md

Hot 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).

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.

Mermaid rendering mode. One of:

  • auto — Render if mmdc available; fall back to raw blocks if missing (default)
  • mmdc — Require mmdc; error placeholder if missing
  • off — Never render; always show raw mermaid blocks

Default: auto

docs:
mermaid: auto # Default
mermaid: mmdc # Strict mode
mermaid: off # Disabled

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 cache

Once the cache exceeds this limit, oldest diagrams are automatically deleted (LRU eviction).

  • dwe docs generate — Generate markdown documentation from user commands
  • dwe validate — Check for documentation errors and orphan translation entries
  • dwe commands list — List user commands with translated descriptions