core.cli

Classes

CLI

Base CLI with automatic component logging support.

Module Contents

class core.cli.CLI(component_name: str | None = None)[source]

Base CLI with automatic component logging support.

parser[source]
component_name = None[source]
main(argstr: str | None = None) Any[source]

Parse args and configure component logging before execution.

configure_component_logging() None[source]

Configure logging for this component using existing infrastructure.

This method can be called directly when needed (e.g., by plugins that bypass the normal main() flow).

parse_args(argstr: str | None = None) argparse.Namespace[source]

Construct a parser, parse either sys.argv (default) or the provided argstr.

Returns a Namespace. The Namespace should have a ‘func’ attribute which can be used to dispatch to the appropriate downstream function.