Skip to content

topmark.cli.commands.registry

topmark / cli / commands / registry

TopMark registry command group.

Provides subcommands for inspecting TopMark registry metadata:

  • topmark registry filetypes: inspect registered file types.
  • topmark registry processors: inspect registered header processors.
  • topmark registry bindings: inspect file-type-to-processor bindings.

registry_command

registry_command()

Group for registry-related subcommands.

This group performs no action itself; use one of its subcommands:

  • filetypes: inspect registered file types.
  • processors: inspect registered header processors.
  • bindings: inspect file-type-to-processor bindings.
Source code in src/topmark/cli/commands/registry.py
@rich_click.group(
    cls=rich_click.RichGroup,
    name=CliCmd.REGISTRY,
    context_settings=GROUP_CONTEXT_SETTINGS,
    help="Inspect TopMark registry metadata.",
    epilog=render_examples_epilog(
        examples=(
            HelpExample(
                summary="Inspect registered file types",
                command_line=f"topmark {CliCmd.REGISTRY} {CliCmd.REGISTRY_FILETYPES}",
            ),
            HelpExample(
                summary="Inspect registered header processors",
                command_line=f"topmark {CliCmd.REGISTRY} {CliCmd.REGISTRY_PROCESSORS}",
            ),
            HelpExample(
                summary="Inspect file-type-to-processor bindings",
                command_line=f"topmark {CliCmd.REGISTRY} {CliCmd.REGISTRY_BINDINGS}",
            ),
        ),
    ),
)
def registry_command() -> None:
    """Group for registry-related subcommands.

    This group performs no action itself; use one of its subcommands:

      * ``filetypes``: inspect registered file types.
      * ``processors``: inspect registered header processors.
      * ``bindings``: inspect file-type-to-processor bindings.
    """