mini_arcade.cli.base_command ============================ .. py:module:: mini_arcade.cli.base_command .. autoapi-nested-parse:: Base command module This module defines the BaseCommand class, which serves as a base for all command implementations. Classes ------- .. autoapisummary:: mini_arcade.cli.base_command.BaseCommand Module Contents --------------- .. py:class:: BaseCommand Bases: :py:obj:`abc.ABC` Base class for all commands. Registration is done via the implementation decorator: @CommandRegistry.implementation("build") class Build(BaseCommand): ... or: from .command_registry import CommandRegistry @CommandRegistry.implementation("build") class Build(BaseCommand): ... Subclasses should implement the execute(...) method as the main entrypoint. :ivar name: Optional[str]: Command name (for registry); defaults to class name lowercased. :ivar aliases: Tuple[str, ...]: Optional command aliases. :ivar summary: Optional[str]: Short description of the command. :ivar epilog: Optional[str]: Additional help text for the command. :ivar args: Optional[List[ArgumentType]]: List of command arguments. :ivar abstract: bool: If True, the command is not registered (base class for shared logic); defaults to False. :ivar processor: Optional[BaseCommandProcessor]: The processor associated with this command. .. py:attribute:: name :type: Optional[str] :value: None .. py:attribute:: aliases :type: Tuple[str, Ellipsis] :value: () .. py:attribute:: summary :type: Optional[str] :value: None .. py:attribute:: epilog :type: Optional[str] :value: None .. py:attribute:: args :type: Optional[List[mini_arcade.cli.argument_type.ArgumentType]] :value: None .. py:attribute:: abstract :type: bool :value: False .. py:attribute:: processor :type: Optional[mini_arcade.cli.base_command_processor.BaseCommandProcessor] :value: None .. py:method:: __init_subclass__(**kwargs) :classmethod: .. py:method:: define_arguments() -> List[mini_arcade.cli.argument_type.ArgumentType] :classmethod: Return the list of ArgumentType for this command. :return: List of ArgumentType instances. :rtype: List[ArgumentType] .. py:method:: validate(**_kwargs) Optional argument validation hook. .. py:method:: set_processor(processor: mini_arcade.cli.base_command_processor.BaseCommandProcessor) Set the processor for the command. :param processor: The processor for the command. :type processor: BaseCommandProcessor .. py:method:: execute(**kwargs) External command entrypoint.