base
appimage_updater.cli.handlers.base
¶
Base interface for CLI command handlers.
CommandHandler
¶
Base interface for CLI command handlers.
Each command handler is responsible for: 1. Registering its command with the Typer application 2. Parsing CLI arguments and options 3. Executing the command logic 4. Handling errors and output formatting
get_command_name()
abstractmethod
¶
Get the name of this command.
Returns:
Type | Description |
---|---|
str
|
The command name (e.g., 'check', 'add', 'list') |
register_command(app)
abstractmethod
¶
Register this command with the Typer application.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
app
|
Typer
|
The Typer application instance to register with |
required |
validate_options(**kwargs)
¶
Validate command options and arguments.
Override this method to add custom validation logic. Should raise typer.Exit(1) for validation errors.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
Any
|
All command options and arguments |
{}
|