Skip to content

topmark.cli.commands.config

topmark / cli / commands / config

TopMark config command group.

Provides subcommands for validating, inspecting, and scaffolding TopMark configuration:

  • topmark config check: validate the effective runtime configuration.
  • topmark config dump: print the effective runtime configuration.
  • topmark config defaults: print the canonical built-in default TOML document.
  • topmark config init: print a starter configuration file.

config_command

config_command()

Group for configuration-related subcommands.

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

  • check: validate the effective runtime configuration.
  • dump: print the effective runtime configuration.
  • defaults: print the canonical built-in defaults.
  • init: print a starter configuration file for projects.
Source code in src/topmark/cli/commands/config.py
@click.group(
    name=CliCmd.CONFIG,
    context_settings=GROUP_CONTEXT_SETTINGS,
    help="Validate, inspect, and scaffold TopMark configuration.",
    epilog=(
        "\b\n"
        "Examples:\n"
        "  # Validate the effective runtime configuration\n"
        f"  topmark {CliCmd.CONFIG} {CliCmd.CONFIG_CHECK}\n"
        "  # Print the effective runtime configuration\n"
        f"  topmark {CliCmd.CONFIG} {CliCmd.CONFIG_DUMP}\n"
        "  # Print the built-in default configuration reference\n"
        f"  topmark {CliCmd.CONFIG} {CliCmd.CONFIG_DEFAULTS}\n"
        "  # Create a starter configuration file for projects\n"
        f"  topmark {CliCmd.CONFIG} {CliCmd.CONFIG_INIT} > topmark.toml\n"
    ),
)
def config_command() -> None:
    """Group for configuration-related subcommands.

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

      * ``check``: validate the effective runtime configuration.
      * ``dump``: print the effective runtime configuration.
      * ``defaults``: print the canonical built-in defaults.
      * ``init``: print a starter configuration file for projects.
    """