Skip to content

CLI (Termynal)

This page renders the CLI's --help as an animated, colored termynal terminal instead of Markdown tables. By default only the root command is rendered; the :subcommands: option sets how many levels of subcommands to stack below it (-1 for the full tree).

Enable it per block with :termynal: true (or globally via the plugin's termynal: true). Use :command: to render a specific subcommand instead of the root (e.g. :command: export, or :command: subapp sub-command for a nested one). The optional :width:, :scheme:, and :dark_bg: options control the captured terminal width and color palette.

mkdocs-typer2 --help
Usage: mkdocs-typer2 [OPTIONS] COMMAND [ARGS]...

A sample CLI

This is a multi-line help message.

╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to copy │
│ it or customize the installation. │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ docs Generate docs for a project │
│ export Export project documentation │
│ subapp │
╰──────────────────────────────────────────────────────────────────────────────╯
mkdocs-typer2 docs --help
Usage: mkdocs-typer2 docs [OPTIONS]

Generate docs for a project

╭─ Options ────────────────────────────────────────────────────────────────────╮
│ * --name TEXT The name of the project [required] │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
mkdocs-typer2 export --help
Usage: mkdocs-typer2 export [OPTIONS]

Export project documentation

╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --detail FUNCTION Documentation detail level │
│ [default: full] │
│ --format [json|yaml|markdown] Export format [default: json] │
│ --retries INTEGER Number of export attempts │
│ [default: 1] │
│ --config PATH Path to config file │
│ [default: mkdocs.yml] │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
mkdocs-typer2 subapp --help
Usage: mkdocs-typer2 subapp [OPTIONS] COMMAND [ARGS]...

╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ sub-command │
│ sub-command-2 │
╰──────────────────────────────────────────────────────────────────────────────╯