Expand description
Human-readable and Markdown renderers for commands.
This module exposes three rendering functions and one disambiguation helper:
-
render_help— produces a multi-section plain-text help page (NAME, SUMMARY, DESCRIPTION, USAGE, ARGUMENTS, FLAGS, SUBCOMMANDS, EXAMPLES, BEST PRACTICES, ANTI-PATTERNS). Sections that have no content are omitted. -
render_subcommand_list— produces a compact two-column listing ofcanonical summarylines, suitable for a top-level--helpdisplay. -
render_markdown— produces a GitHub-flavored Markdown page with##headings, argument/flag tables, and fenced code blocks for examples. -
render_ambiguity— formats a human-readable message when a command token is ambiguous. -
render_docs— produces a full Markdown reference document for all commands in acrate::query::Registry, with a table of contents and per-command sections separated by---. -
render_skill_file— produces a structured Markdown skill file for a single command, encoding best practices, anti-patterns, and examples in a format suitable for loading into an AI agent context (e.g..claude/commands/). -
render_skill_files— callsrender_skill_fileon every command in acrate::query::Registry(depth-first) and concatenates the results separated by---. -
render_skill_file_with_frontmatter— produces an agent-consumable Markdown skill file with YAML frontmatter for a single command. -
render_skill_files_with_frontmatter— renders all skill files in a registry, each optionally prepended with YAML frontmatter.
None of the functions print to stdout/stderr directly; all return a
String that the caller can write wherever appropriate.
Structs§
- Default
Renderer - The default renderer. Delegates to the module-level free functions.
- Skill
Frontmatter - Optional YAML frontmatter to prepend to a skill file.
Enums§
- Shell
- A supported shell for completion script generation.
Traits§
- Renderer
- A pluggable renderer for command help, Markdown docs, and disambiguation messages.
Functions§
- render_
ambiguity - Render a human-readable disambiguation message.
- render_
completion - Generate a shell completion script for a registry of commands.
- render_
docs - Render a full Markdown reference document for all commands in a registry.
- render_
help - Render a human-readable help page for a command.
- render_
json_ schema - Generate a JSON Schema (draft-07) describing the inputs for a command.
- render_
markdown - Render a Markdown documentation page for a command.
- render_
resolve_ error - Render any
crate::ResolveErroras a human-readable string. - render_
skill_ file - Render a structured Markdown skill file for a single command.
- render_
skill_ file_ with_ frontmatter - Render a skill file with YAML frontmatter prepended.
- render_
skill_ files - Render skill files for every command in a registry.
- render_
skill_ files_ with_ frontmatter - Render all skill files in the registry, each optionally with its own frontmatter.
- render_
subcommand_ list - Render a compact listing of multiple commands (e.g. for a top-level help).