Skip to main content

mr docs dump

Emit the full mr command tree with rich metadata: persistent flags, per-command local and inherited flags, required-flag lists, positional-argument contracts, parsed examples, and Annotations (outputShape, exitCodes, relatedCmds). JSON output is intended for agents and tooling; Markdown output is intended for the docs-site (docs-site/docs/cli/).

Cobra's built-in help and completion subcommands are skipped: they are not user-facing and are excluded from the documented contract.

Usage

mr docs dump

Examples

Emit JSON to stdout (agent-friendly)

mr docs dump --format json

Emit JSON to a file

mr docs dump --format json --output /tmp/mr-tree.json

Regenerate docs-site pages

mr docs dump --format markdown --output docs-site/docs/cli/

Flags

FlagTypeDefaultDescription
--formatstring``Output format: json (stdout by default) or markdown (requires --output). Required. (required)
--outputstring``Output path. Required for markdown; optional for json (stdout when omitted).
--helpboolfalsehelp for dump

Inherited global flags

FlagTypeDefaultDescription
--jsonboolfalseOutput raw JSON
--no-headerboolfalseOmit table headers
--pageint1Page number for list commands (default page size: 50)
--quietboolfalseOnly output IDs
--serverstringhttp://localhost:8181mahresources server URL (env: MAHRESOURCES_URL)

Output

CommandTree JSON (when --format json) or directory of Markdown files (when --format markdown)

Exit Codes

0 on success; 1 on any error

See Also