Skip to content

repository_handler

appimage_updater.cli.handlers.repository_handler

Repository command handler for CLI.

RepositoryCommandHandler()

Handler for the repository command.

Source code in src/appimage_updater/cli/handlers/repository_handler.py
def __init__(self) -> None:
    """Initialize the repository command handler."""
    self.console = Console()

console = Console() instance-attribute

get_command_name()

Get the name of this command.

Source code in src/appimage_updater/cli/handlers/repository_handler.py
def get_command_name(self) -> str:
    """Get the name of this command."""
    return "repository"

register_command(app)

Register the repository command with the Typer application.

Source code in src/appimage_updater/cli/handlers/repository_handler.py
def register_command(self, app: typer.Typer) -> None:
    """Register the repository command with the Typer application."""

    @app.command()
    def repository(
        app_names: list[str] = CLIOptions.REPOSITORY_APP_NAME_ARGUMENT,
        config_dir: Path | None = CLIOptions.CONFIG_DIR_OPTION,
        limit: int = CLIOptions.REPOSITORY_LIMIT_OPTION,
        assets: bool = CLIOptions.REPOSITORY_ASSETS_OPTION,
        dry_run: bool = CLIOptions.REPOSITORY_DRY_RUN_OPTION,
        instrument_http: bool = CLIOptions.INSTRUMENT_HTTP_OPTION,
        http_stack_depth: int = CLIOptions.HTTP_STACK_DEPTH_OPTION,
        http_track_headers: bool = CLIOptions.HTTP_TRACK_HEADERS_OPTION,
        trace: bool = CLIOptions.TRACE_OPTION,
        debug: bool = CLIOptions.debug_option(),
        output_format: OutputFormat = CLIOptions.FORMAT_OPTION,
        _version: bool = CLIOptions.version_option(self._version_callback),
    ) -> None:
        """Examine repository information for configured applications."""
        self._execute_repository_command(
            app_names=app_names,
            config_dir=config_dir,
            limit=limit,
            assets=assets,
            dry_run=dry_run,
            instrument_http=instrument_http,
            http_stack_depth=http_stack_depth,
            http_track_headers=http_track_headers,
            trace=trace,
            debug=debug,
            output_format=output_format,
        )