Configuration reference
The canonical tool configuration is .ledger/documentledger/config.toml, version 2. Project identity and mount routing belong to .ledger/ledger.toml and ledgercore, not this file.
Example
config_version = 2
[ledger]
code = "dl"
[scan]
source_roots = ["documentledger", "tests"]
doc_roots = ["docs", "README.md"]
source_extensions = [".py"]
doc_extensions = [".md"]
[validation]
commands = [
"python -m pytest -q",
"python -m compileall -q documentledger tests",
"bash docs/build.sh",
]
[policy]
require_doc_frontmatter = false
Fields
Field |
Type and default |
Normalization and validation |
Effect |
|---|---|---|---|
|
integer, required, |
Must be exactly 2; unknown versions fail |
Selects the tool schema. |
|
non-empty string, default |
Must be a string |
Prefix used by project-local ledger conventions. |
|
array of strings, default empty |
Paths are interpreted relative to project root |
Files collected for source indexing. |
|
array of strings, default empty |
Paths are interpreted relative to project root |
Files collected and parsed as documentation. |
|
array of strings, default empty |
Extension filters are explicit |
Limits source collection. |
|
array of strings, default empty |
Extension filters are explicit |
Limits documentation collection. |
|
array of strings, default empty |
Preserved as ordered commands |
Commands used by context and |
|
boolean, default |
Non-boolean values fail |
Requires front matter during validation. |
Unknown tables and fields fail with unsupported_tool_config_field; wrong types fail with invalid_tool_config; unsupported versions fail with unsupported_tool_config_version.
Inspect and validate
documentledger config show
documentledger config validate
Both commands read the effective canonical configuration. Validation is read-only and does not rewrite malformed files. Legacy root configuration files are migration inputs only, not the normal configuration model.