CLI reference
This is the authoritative canonical command reference. It is generated from COMMAND_INVENTORY and the registered Click command tree; run the generator check in CI after command changes.
Global options
Global options may appear before the command path:
Option |
Effect |
|---|---|
|
Resolve the project from PATH instead of the current directory. |
|
Emit the stable JSON envelope. |
|
Include diagnostic operation events in JSON output. |
|
Show the installed version. |
|
Install shell completion. |
|
Print shell completion. |
Canonical commands
init
Initialize Documentledger storage for a project.
Effect:
workspace-writeAudience:
agentWorkspace required:
noTargeting:
noneCompatibility aliases: None
Syntax
documentledger init
Arguments and options
Parameter |
Required |
Default |
Type |
|---|---|---|---|
|
no |
`` |
|
|
no |
|
|
|
no |
`` |
|
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger init
status
Show concise Documentledger status.
Effect:
readAudience:
bothWorkspace required:
noTargeting:
noneCompatibility aliases: None
Syntax
documentledger status
Arguments and options
None.
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger status
info
Show full Documentledger storage and configuration inventory.
Effect:
readAudience:
bothWorkspace required:
yesTargeting:
noneCompatibility aliases: None
Syntax
documentledger info
Arguments and options
None.
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger info
doctor
Run detailed read-only diagnostics.
Effect:
readAudience:
bothWorkspace required:
yesTargeting:
noneCompatibility aliases: None
Syntax
documentledger doctor
Arguments and options
None.
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger doctor
check
Run deterministic CI validation gate.
Effect:
readAudience:
agentWorkspace required:
yesTargeting:
noneCompatibility aliases: None
Syntax
documentledger check
Arguments and options
None.
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger check
next-action
Show the single recommended next command.
Effect:
readAudience:
agentWorkspace required:
noTargeting:
noneCompatibility aliases: None
Syntax
documentledger next-action
Arguments and options
None.
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger next-action
scan
Run an incremental source scan.
Effect:
workspace-writeAudience:
agentWorkspace required:
yesTargeting:
noneCompatibility aliases: None
Syntax
documentledger scan
Arguments and options
None.
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger scan
coverage
Compute documentation coverage metrics.
Effect:
readAudience:
bothWorkspace required:
yesTargeting:
noneCompatibility aliases: None
Syntax
documentledger coverage
Arguments and options
None.
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger coverage
commands
List all registered commands.
Effect:
readAudience:
bothWorkspace required:
noTargeting:
noneCompatibility aliases: None
Syntax
documentledger commands
Arguments and options
None.
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger commands
help
Show help for a command path.
Effect:
readAudience:
bothWorkspace required:
noTargeting:
command-pathCompatibility aliases: None
Syntax
documentledger help
Arguments and options
Parameter |
Required |
Default |
Type |
|---|---|---|---|
|
no |
|
|
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger help
config show
Show effective Documentledger configuration.
Effect:
readAudience:
bothWorkspace required:
yesTargeting:
noneCompatibility aliases: None
Syntax
documentledger config show
Arguments and options
None.
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger config show
config validate
Validate the effective tool config.
Effect:
readAudience:
agentWorkspace required:
yesTargeting:
noneCompatibility aliases: None
Syntax
documentledger config validate
Arguments and options
None.
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger config validate
schema list
List known schema names.
Effect:
readAudience:
agentWorkspace required:
noTargeting:
noneCompatibility aliases: None
Syntax
documentledger schema list
Arguments and options
None.
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger schema list
schema show
Show metadata for a schema.
Effect:
readAudience:
agentWorkspace required:
noTargeting:
schema-nameCompatibility aliases: None
Syntax
documentledger schema show
Arguments and options
Parameter |
Required |
Default |
Type |
|---|---|---|---|
|
yes |
`` |
|
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger schema show
schema values
Show known values for a schema.
Effect:
readAudience:
agentWorkspace required:
noTargeting:
schema-nameCompatibility aliases: None
Syntax
documentledger schema values
Arguments and options
Parameter |
Required |
Default |
Type |
|---|---|---|---|
|
no |
`` |
|
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger schema values
document list
List tracked documentation files.
Effect:
readAudience:
bothWorkspace required:
yesTargeting:
noneCompatibility aliases:
docs list
Syntax
documentledger document list
Arguments and options
None.
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger document list
document sections
Show sections in documentation files.
Effect:
readAudience:
bothWorkspace required:
yesTargeting:
document-or-sectionCompatibility aliases:
docs sections
Syntax
documentledger document sections
Arguments and options
Parameter |
Required |
Default |
Type |
|---|---|---|---|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger document sections
document affected
Show documentation sections affected by source changes.
Effect:
readAudience:
agentWorkspace required:
yesTargeting:
noneCompatibility aliases:
docs affected
Syntax
documentledger document affected
Arguments and options
Parameter |
Required |
Default |
Type |
|---|---|---|---|
|
no |
`` |
|
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger document affected
document stale
Show stale documentation details.
Effect:
readAudience:
agentWorkspace required:
yesTargeting:
noneCompatibility aliases:
docs stale
Syntax
documentledger document stale
Arguments and options
None.
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger document stale
document build-context
Build a bounded documentation update context.
Effect:
workspace-writeAudience:
agentWorkspace required:
yesTargeting:
document-or-sectionCompatibility aliases:
docs build-context
Syntax
documentledger document build-context
Arguments and options
Parameter |
Required |
Default |
Type |
|---|---|---|---|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
|
no |
|
|
|
no |
|
|
|
no |
|
|
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger document build-context
document mark-fresh
Mark documentation sections as fresh.
Effect:
workspace-writeAudience:
agentWorkspace required:
yesTargeting:
document-or-sectionCompatibility aliases:
mark-fresh
Syntax
documentledger document mark-fresh
Arguments and options
Parameter |
Required |
Default |
Type |
|---|---|---|---|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
|
yes |
`` |
|
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger document mark-fresh
source list
List source units in the inventory.
Effect:
readAudience:
bothWorkspace required:
yesTargeting:
noneCompatibility aliases:
sources list
Syntax
documentledger source list
Arguments and options
Parameter |
Required |
Default |
Type |
|---|---|---|---|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
|
no |
|
|
|
no |
`` |
|
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger source list
source show
Show details for a source unit.
Effect:
readAudience:
bothWorkspace required:
yesTargeting:
source-unitCompatibility aliases:
sources show
Syntax
documentledger source show
Arguments and options
Parameter |
Required |
Default |
Type |
|---|---|---|---|
|
yes |
`` |
|
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger source show
link list
List documentation-to-source links.
Effect:
readAudience:
bothWorkspace required:
yesTargeting:
noneCompatibility aliases:
links list
Syntax
documentledger link list
Arguments and options
None.
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger link list
link add
Add a documentation-to-source link.
Effect:
workspace-writeAudience:
agentWorkspace required:
yesTargeting:
noneCompatibility aliases:
links add
Syntax
documentledger link add
Arguments and options
Parameter |
Required |
Default |
Type |
|---|---|---|---|
|
yes |
`` |
|
|
yes |
`` |
|
|
no |
`` |
|
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger link add
link remove
Remove a documentation-to-source link.
Effect:
workspace-writeAudience:
agentWorkspace required:
yesTargeting:
noneCompatibility aliases:
links remove
Syntax
documentledger link remove
Arguments and options
Parameter |
Required |
Default |
Type |
|---|---|---|---|
|
yes |
`` |
|
|
yes |
`` |
|
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger link remove
link add-section
Add a section-level source link.
Effect:
workspace-writeAudience:
agentWorkspace required:
yesTargeting:
noneCompatibility aliases:
links add-section
Syntax
documentledger link add-section
Arguments and options
Parameter |
Required |
Default |
Type |
|---|---|---|---|
|
yes |
`` |
|
|
yes |
`` |
|
|
yes |
`` |
|
|
yes |
`` |
|
|
yes |
`` |
|
|
yes |
`` |
|
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger link add-section
link remove-section
Remove a section-level source link.
Effect:
workspace-writeAudience:
agentWorkspace required:
yesTargeting:
noneCompatibility aliases:
links remove-section
Syntax
documentledger link remove-section
Arguments and options
Parameter |
Required |
Default |
Type |
|---|---|---|---|
|
yes |
`` |
|
|
yes |
`` |
|
|
yes |
`` |
|
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger link remove-section
link import-map
Import a mapping batch of links.
Effect:
workspace-writeAudience:
agentWorkspace required:
yesTargeting:
noneCompatibility aliases:
links import-map
Syntax
documentledger link import-map
Arguments and options
Parameter |
Required |
Default |
Type |
|---|---|---|---|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger link import-map
link audit
Audit links for consistency.
Effect:
readAudience:
agentWorkspace required:
yesTargeting:
noneCompatibility aliases:
links audit
Syntax
documentledger link audit
Arguments and options
None.
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger link audit
link propose
Propose new links from source inventory.
Effect:
workspace-writeAudience:
agentWorkspace required:
yesTargeting:
noneCompatibility aliases:
links propose
Syntax
documentledger link propose
Arguments and options
Parameter |
Required |
Default |
Type |
|---|---|---|---|
|
no |
`` |
|
|
no |
`` |
|
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger link propose
storage where
Show Documentledger storage locations.
Effect:
readAudience:
bothWorkspace required:
noTargeting:
noneCompatibility aliases: None
Syntax
documentledger storage where
Arguments and options
None.
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger storage where
storage validate
Validate canonical storage bindings.
Effect:
readAudience:
agentWorkspace required:
yesTargeting:
noneCompatibility aliases:
storage verify
Syntax
documentledger storage validate
Arguments and options
Parameter |
Required |
Default |
Type |
|---|---|---|---|
|
no |
`` |
|
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger storage validate
migrate status
Show migration status and available migrations.
Effect:
readAudience:
bothWorkspace required:
noTargeting:
noneCompatibility aliases: None
Syntax
documentledger migrate status
Arguments and options
None.
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger migrate status
migrate plan
Generate a migration plan without applying it.
Effect:
readAudience:
agentWorkspace required:
yesTargeting:
migration-nameCompatibility aliases: None
Syntax
documentledger migrate plan
Arguments and options
Parameter |
Required |
Default |
Type |
|---|---|---|---|
|
no |
|
|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger migrate plan
migrate apply
Apply a validated migration plan.
Effect:
workspace-writeAudience:
agentWorkspace required:
yesTargeting:
migration-nameCompatibility aliases: None
Syntax
documentledger migrate apply
Arguments and options
Parameter |
Required |
Default |
Type |
|---|---|---|---|
|
no |
|
|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger migrate apply
migrate recover
Recover from an interrupted migration.
Effect:
workspace-writeAudience:
agentWorkspace required:
yesTargeting:
noneCompatibility aliases: None
Syntax
documentledger migrate recover
Arguments and options
Parameter |
Required |
Default |
Type |
|---|---|---|---|
|
yes |
`` |
|
|
no |
|
|
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger migrate recover
migrate cleanup
Clean up legacy source after migration.
Effect:
workspace-writeAudience:
agentWorkspace required:
yesTargeting:
migration-nameCompatibility aliases: None
Syntax
documentledger migrate cleanup
Arguments and options
Parameter |
Required |
Default |
Type |
|---|---|---|---|
|
no |
|
|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
|
no |
`` |
|
JSON result and errors
With --json, the command returns ok, command, a command-specific result, and events. Failures return the normalized error object with code, message, remediation, and details.domain_code. Invalid workspace, selector, cursor, link, or migration state is reported before a write when applicable.
Example
documentledger migrate cleanup
Compatibility commands
Compatibility interfaces are documented separately and are not canonical inventory entries:
Compatibility path |
Use instead |
|---|---|
|
|
|
|
|
|
|
|
root |
|
|
|
|
|
|
|
|
|
Deprecated since version 0.6: These wrappers remain for compatibility and may emit deprecation warnings. New automation must use canonical command paths.