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
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
| @rich_click.group(
cls=rich_click.RichGroup,
name=CliCmd.CONFIG,
context_settings=GROUP_CONTEXT_SETTINGS,
help="Validate, inspect, and scaffold TopMark configuration.",
epilog=render_examples_epilog(
examples=(
HelpExample(
summary="Validate the effective runtime configuration",
command_line=f"topmark {CliCmd.CONFIG} {CliCmd.CONFIG_CHECK}",
),
HelpExample(
summary="Print the effective runtime configuration",
command_line=f"topmark {CliCmd.CONFIG} {CliCmd.CONFIG_DUMP}",
),
HelpExample(
summary="Print the built-in default configuration reference",
command_line=f"topmark {CliCmd.CONFIG} {CliCmd.CONFIG_DEFAULTS}",
),
HelpExample(
summary="Create a starter configuration file for projects",
command_line=f"topmark {CliCmd.CONFIG} {CliCmd.CONFIG_INIT} > topmark.toml",
),
),
),
)
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.
"""
|