Skip to content

main

appimage_updater.main

Main application entry point.

app = typer.Typer(name='appimage-updater', help='AppImage update manager') module-attribute

global_state = GlobalState() module-attribute

GlobalState

Global state for CLI options that need to be accessible across commands.

debug = False class-attribute instance-attribute

add(name=_ADD_NAME_ARGUMENT, url=_ADD_URL_ARGUMENT, download_dir=_ADD_DOWNLOAD_DIR_ARGUMENT, create_dir=_CREATE_DIR_OPTION, yes=_YES_OPTION, no=_NO_OPTION, config_file=_CONFIG_FILE_OPTION, config_dir=_CONFIG_DIR_OPTION, rotation=_ROTATION_OPTION, retain=_RETAIN_OPTION, symlink=_SYMLINK_OPTION, prerelease=_ADD_PRERELEASE_OPTION, basename=_ADD_BASENAME_OPTION, checksum=_ADD_CHECKSUM_OPTION, checksum_algorithm=_ADD_CHECKSUM_ALGORITHM_OPTION, checksum_pattern=_ADD_CHECKSUM_PATTERN_OPTION, checksum_required=_ADD_CHECKSUM_REQUIRED_OPTION, pattern=_ADD_PATTERN_OPTION, direct=_ADD_DIRECT_OPTION, auto_subdir=_ADD_AUTO_SUBDIR_OPTION, verbose=_VERBOSE_OPTION, dry_run=_DRY_RUN_OPTION, interactive=_INTERACTIVE_OPTION, examples=typer.Option(False, '--examples', help='Show usage examples and exit'), debug=get_debug_option(), format=FORMAT_OPTION, version=get_version_option())

Add a new application to the configuration.

BASIC USAGE

Add an application with minimal options - intelligent defaults will be generated.

FILE MANAGEMENT

Control download directories, file rotation, and symlink management.

CHECKSUM VERIFICATION

Configure checksum validation for security and integrity checks.

ADVANCED OPTIONS

Fine-tune pattern matching, repository detection, and specialized settings.

Use --interactive for a guided setup experience with step-by-step prompts. Use --examples to see detailed usage examples.

Source code in src/appimage_updater/main.py
@app.command()
def add(
    name: str | None = _ADD_NAME_ARGUMENT,
    url: str | None = _ADD_URL_ARGUMENT,
    download_dir: str | None = _ADD_DOWNLOAD_DIR_ARGUMENT,
    create_dir: bool = _CREATE_DIR_OPTION,
    yes: bool = _YES_OPTION,
    no: bool = _NO_OPTION,
    config_file: Path | None = _CONFIG_FILE_OPTION,
    config_dir: Path | None = _CONFIG_DIR_OPTION,
    rotation: bool | None = _ROTATION_OPTION,
    retain: int = _RETAIN_OPTION,
    symlink: str | None = _SYMLINK_OPTION,
    prerelease: bool | None = _ADD_PRERELEASE_OPTION,
    basename: str | None = _ADD_BASENAME_OPTION,
    checksum: bool | None = _ADD_CHECKSUM_OPTION,
    checksum_algorithm: str = _ADD_CHECKSUM_ALGORITHM_OPTION,
    checksum_pattern: str = _ADD_CHECKSUM_PATTERN_OPTION,
    checksum_required: bool | None = _ADD_CHECKSUM_REQUIRED_OPTION,
    pattern: str | None = _ADD_PATTERN_OPTION,
    direct: bool | None = _ADD_DIRECT_OPTION,
    auto_subdir: bool | None = _ADD_AUTO_SUBDIR_OPTION,
    verbose: bool = _VERBOSE_OPTION,
    dry_run: bool = _DRY_RUN_OPTION,
    interactive: bool = _INTERACTIVE_OPTION,
    examples: bool = typer.Option(False, "--examples", help="Show usage examples and exit"),
    debug: bool = get_debug_option(),
    format: OutputFormat = FORMAT_OPTION,
    version: bool = get_version_option(),
) -> None:
    """Add a new application to the configuration.

    BASIC USAGE:
        Add an application with minimal options - intelligent defaults will be generated.

    FILE MANAGEMENT:
        Control download directories, file rotation, and symlink management.

    CHECKSUM VERIFICATION:
        Configure checksum validation for security and integrity checks.

    ADVANCED OPTIONS:
        Fine-tune pattern matching, repository detection, and specialized settings.

    Use --interactive for a guided setup experience with step-by-step prompts.
    Use --examples to see detailed usage examples.
    """
    # Validate mutually exclusive options
    if yes and no:
        console.print("[red]Error: --yes and --no options are mutually exclusive")
        raise typer.Exit(1)

    command = CommandFactory.create_add_command(
        name=name,
        url=url,
        download_dir=download_dir,
        create_dir=create_dir,
        yes=yes,
        config_file=config_file,
        config_dir=config_dir,
        rotation=rotation,
        retain=retain,
        symlink=symlink,
        prerelease=prerelease,
        basename=basename,
        checksum=checksum,
        checksum_algorithm=checksum_algorithm,
        checksum_pattern=checksum_pattern,
        checksum_required=checksum_required,
        pattern=pattern,
        direct=direct,
        auto_subdir=auto_subdir,
        verbose=verbose,
        dry_run=dry_run,
        interactive=interactive,
        examples=examples,
        debug=debug,
        format=format,
    )

    # Create output formatter and execute with context
    output_formatter = create_output_formatter_from_params(command.params)

    # Handle format-specific finalization
    if format in [OutputFormat.JSON, OutputFormat.HTML]:
        result = asyncio.run(command.execute(output_formatter=output_formatter))
        output_formatter.finalize()
    else:
        result = asyncio.run(command.execute(output_formatter=output_formatter))

    if not result.success:
        raise typer.Exit(result.exit_code)

check(app_names=_CHECK_APP_NAME_ARGUMENT, config_file=CONFIG_FILE_OPTION, config_dir=CONFIG_DIR_OPTION, dry_run=DRY_RUN_OPTION, yes=YES_OPTION, no=NO_OPTION, no_interactive=NO_INTERACTIVE_OPTION, verbose=VERBOSE_OPTION, debug=_DEBUG_OPTION, format=FORMAT_OPTION, info=typer.Option(False, '--info', help='Update or create .info files with current version scheme for selected applications'), instrument_http=INSTRUMENT_HTTP_OPTION, http_stack_depth=HTTP_STACK_DEPTH_OPTION, http_track_headers=HTTP_TRACK_HEADERS_OPTION, version=typer.Option(False, '--version', '-V', help='Show version and exit', callback=version_callback, is_eager=True))

Check for updates to configured applications.

Examines each configured application to determine if newer versions are available. By default, this command only checks for updates without downloading them.

Use --yes to automatically download available updates. Use --no to perform real checks but automatically decline downloads. Use --dry-run to preview what would be checked without making network requests. Use --verbose to see detailed parameter resolution and processing information.

Source code in src/appimage_updater/main.py
@app.command()
def check(
    app_names: list[str] = _CHECK_APP_NAME_ARGUMENT,
    config_file: Path | None = CONFIG_FILE_OPTION,
    config_dir: Path | None = CONFIG_DIR_OPTION,
    dry_run: bool = DRY_RUN_OPTION,
    yes: bool = YES_OPTION,
    no: bool = NO_OPTION,
    no_interactive: bool = NO_INTERACTIVE_OPTION,
    verbose: bool = VERBOSE_OPTION,
    debug: bool = _DEBUG_OPTION,
    format: OutputFormat = FORMAT_OPTION,
    info: bool = typer.Option(
        False,
        "--info",
        help="Update or create .info files with current version scheme for selected applications",
    ),
    instrument_http: bool = INSTRUMENT_HTTP_OPTION,
    http_stack_depth: int = HTTP_STACK_DEPTH_OPTION,
    http_track_headers: bool = HTTP_TRACK_HEADERS_OPTION,
    version: bool = typer.Option(
        False,
        "--version",
        "-V",
        help="Show version and exit",
        callback=version_callback,
        is_eager=True,
    ),
) -> None:
    """Check for updates to configured applications.

    Examines each configured application to determine if newer versions are available.
    By default, this command only checks for updates without downloading them.

    Use --yes to automatically download available updates.
    Use --no to perform real checks but automatically decline downloads.
    Use --dry-run to preview what would be checked without making network requests.
    Use --verbose to see detailed parameter resolution and processing information.
    """
    # Validate mutually exclusive options
    if yes and no:
        console.print("[red]Error: --yes and --no options are mutually exclusive")
        raise typer.Exit(1)
    command = CommandFactory.create_check_command(
        app_names=app_names,
        config_file=config_file,
        config_dir=config_dir,
        dry_run=dry_run,
        yes=yes,
        no=no,
        no_interactive=no_interactive,
        verbose=verbose,
        debug=debug,
        info=info,
        instrument_http=instrument_http,
        http_stack_depth=http_stack_depth,
        http_track_headers=http_track_headers,
        format=format,
    )

    # Create HTTP tracker based on parameters
    http_tracker = create_http_tracker_from_params(command.params)
    output_formatter = create_output_formatter_from_params(command.params)

    result = asyncio.run(command.execute(http_tracker=http_tracker, output_formatter=output_formatter))

    # Handle format-specific finalization
    if format in [OutputFormat.JSON, OutputFormat.HTML]:
        output_formatter.finalize()
    if not result.success:
        raise typer.Exit(result.exit_code)

cli_main()

Main CLI entry point with proper exception handling.

Source code in src/appimage_updater/main.py
def cli_main() -> None:
    """Main CLI entry point with proper exception handling."""

    # Override sys.excepthook to prevent stack traces from being displayed
    def clean_excepthook(exc_type: type[BaseException], exc_value: BaseException, exc_traceback: Any) -> None:
        """Clean exception handler that doesn't show stack traces for user errors."""
        # For typer.Exit and click.exceptions.Exit, just exit cleanly
        if exc_type.__name__ in ("Exit", "ClickException") or issubclass(exc_type, SystemExit):
            if hasattr(exc_value, "exit_code"):
                sys.exit(exc_value.exit_code)
            else:
                sys.exit(getattr(exc_value, "code", 1))

        # For other exceptions, show a clean error message without stack trace
        console = Console(stderr=True)
        console.print(f"[red]Error: {exc_value}[/red]")
        sys.exit(1)

    # Install our clean exception handler
    # Note: excepthook assignment is intentional for global error handling
    sys.excepthook = clean_excepthook

    try:
        app()
    except (typer.Exit, SystemExit) as e:
        # Handle exits cleanly without showing stack trace
        sys.exit(getattr(e, "exit_code", getattr(e, "code", 1)))
    except KeyboardInterrupt:
        # Handle Ctrl+C gracefully
        console = Console(stderr=True)
        console.print("\n[yellow]Operation cancelled by user.[/yellow]")
        sys.exit(130)  # Standard exit code for SIGINT
    except Exception as e:
        # Handle unexpected exceptions with clean error message
        console = Console(stderr=True)
        console.print(f"[red]Error: {e}[/red]")
        sys.exit(1)

config(action=typer.Argument(default='', help='Action: show, set, reset, show-effective, list'), setting=typer.Argument(default='', help="Setting name (for 'set' action)"), value=typer.Argument(default='', help="Setting value (for 'set' action)"), app_name=typer.Option('', '--app', help="Application name (for 'show-effective' action)"), config_file=_CONFIG_FILE_OPTION, config_dir=_CONFIG_DIR_OPTION, debug=get_debug_option(), format=FORMAT_OPTION, version=get_version_option())

Manage global configuration settings.

Source code in src/appimage_updater/main.py
@app.command()
def config(
    action: str = typer.Argument(default="", help="Action: show, set, reset, show-effective, list"),
    setting: str = typer.Argument(default="", help="Setting name (for 'set' action)"),
    value: str = typer.Argument(default="", help="Setting value (for 'set' action)"),
    app_name: str = typer.Option("", "--app", help="Application name (for 'show-effective' action)"),
    config_file: Path = _CONFIG_FILE_OPTION,
    config_dir: Path = _CONFIG_DIR_OPTION,
    debug: bool = get_debug_option(),
    format: OutputFormat = FORMAT_OPTION,
    version: bool = get_version_option(),
) -> None:
    """Manage global configuration settings."""
    # Show help if no action is provided
    if not action:
        typer.echo("Usage: appimage-updater config [OPTIONS] ACTION [SETTING] [VALUE]")
        typer.echo("")
        typer.echo("Manage global configuration settings.")
        typer.echo("")
        typer.echo("Arguments:")
        typer.echo("  ACTION     Action: show, set, reset, show-effective, list")
        typer.echo("  [SETTING]  Setting name (for 'set' action)")
        typer.echo("  [VALUE]    Setting value (for 'set' action)")
        typer.echo("")
        typer.echo("Options:")
        typer.echo("  --app TEXT                      Application name (for 'show-effective' action)")
        typer.echo("  --config, -c PATH               Configuration file path")
        typer.echo("  --config-dir, -d PATH           Configuration directory path")
        typer.echo("  --debug                         Enable debug logging")
        typer.echo("  --version, -V                   Show version and exit")
        typer.echo("  --help                          Show this message and exit.")
        raise typer.Exit(0)
    command = CommandFactory.create_config_command(
        action=action,
        setting=setting,
        value=value,
        app_name=app_name,
        config_file=config_file,
        config_dir=config_dir,
        debug=debug,
        format=format,
    )

    # Create output formatter and execute with context
    output_formatter = create_output_formatter_from_params(command.params)

    # Handle format-specific finalization
    if format in [OutputFormat.JSON, OutputFormat.HTML]:
        result = asyncio.run(command.execute(output_formatter=output_formatter))
        output_formatter.finalize()
    else:
        result = asyncio.run(command.execute(output_formatter=output_formatter))

    if not result.success:
        raise typer.Exit(result.exit_code)

edit(app_names=_EDIT_APP_NAME_ARGUMENT_OPTIONAL, config_file=CONFIG_FILE_OPTION, config_dir=CONFIG_DIR_OPTION, url=EDIT_URL_OPTION, download_dir=EDIT_DOWNLOAD_DIR_OPTION, basename=EDIT_BASENAME_OPTION, pattern=EDIT_PATTERN_OPTION, enable=EDIT_ENABLE_OPTION, prerelease=EDIT_PRERELEASE_OPTION, rotation=EDIT_ROTATION_OPTION, symlink_path=EDIT_SYMLINK_PATH_OPTION, retain_count=EDIT_RETAIN_COUNT_OPTION, checksum=EDIT_CHECKSUM_OPTION, checksum_algorithm=EDIT_CHECKSUM_ALGORITHM_OPTION, checksum_pattern=EDIT_CHECKSUM_PATTERN_OPTION, checksum_required=EDIT_CHECKSUM_REQUIRED_OPTION, create_dir=CREATE_DIR_OPTION, yes=YES_OPTION, no=NO_OPTION, force=EDIT_FORCE_OPTION, direct=EDIT_DIRECT_OPTION, auto_subdir=EDIT_AUTO_SUBDIR_OPTION, verbose=VERBOSE_OPTION, dry_run=EDIT_DRY_RUN_OPTION, debug=get_debug_option(), format=FORMAT_OPTION, version=get_version_option())

Edit configuration for existing applications.

Update any configuration field by specifying the corresponding option. Only the specified fields will be changed - all other settings remain unchanged. When multiple applications are specified, the same changes are applied to all.

BASIC CONFIGURATION

--url URL Update repository URL --download-dir PATH Update download directory --pattern REGEX Update file pattern --enable/--disable Enable or disable application --prerelease/--no-prerelease Enable or disable prereleases

ROTATION CONFIGURATION

--rotation/--no-rotation Enable or disable file rotation --symlink-path PATH Set symlink path (required for rotation) --retain-count N Number of old files to keep (1-10)

CHECKSUM CONFIGURATION

--checksum/--no-checksum Enable or disable checksum verification --checksum-algorithm ALG Set algorithm (sha256, sha1, md5) --checksum-pattern PATTERN Set checksum file pattern --checksum-required/--checksum-optional Make verification required/optional

COMMON EXAMPLES

appimage-updater edit FreeCAD --rotation --symlink-path ~/bin/freecad.AppImage

Enable prerelease for multiple apps

appimage-updater edit OrcaSlicer OrcaSlicerRC --prerelease

Update download directory

appimage-updater edit MyApp --download-dir ~/NewLocation/MyApp --create-dir

Configure security settings

appimage-updater edit OrcaSlicer BambuStudio --no-prerelease --checksum-required

Update URL after repository move

appimage-updater edit OldApp --url https://github.com/newowner/newrepo

Source code in src/appimage_updater/main.py
@app.command()
def edit(
    app_names: list[str] | None = _EDIT_APP_NAME_ARGUMENT_OPTIONAL,
    config_file: Path | None = CONFIG_FILE_OPTION,
    config_dir: Path | None = CONFIG_DIR_OPTION,
    # Basic configuration options
    url: str | None = EDIT_URL_OPTION,
    download_dir: str | None = EDIT_DOWNLOAD_DIR_OPTION,
    basename: str | None = EDIT_BASENAME_OPTION,
    pattern: str | None = EDIT_PATTERN_OPTION,
    enable: bool | None = EDIT_ENABLE_OPTION,
    prerelease: bool | None = EDIT_PRERELEASE_OPTION,
    # Rotation options
    rotation: bool | None = EDIT_ROTATION_OPTION,
    symlink_path: str | None = EDIT_SYMLINK_PATH_OPTION,
    retain_count: int | None = EDIT_RETAIN_COUNT_OPTION,
    # Checksum options
    checksum: bool | None = EDIT_CHECKSUM_OPTION,
    checksum_algorithm: str | None = EDIT_CHECKSUM_ALGORITHM_OPTION,
    checksum_pattern: str | None = EDIT_CHECKSUM_PATTERN_OPTION,
    checksum_required: bool | None = EDIT_CHECKSUM_REQUIRED_OPTION,
    # Directory creation option
    create_dir: bool = CREATE_DIR_OPTION,
    yes: bool = YES_OPTION,
    no: bool = NO_OPTION,
    force: bool = EDIT_FORCE_OPTION,
    direct: bool | None = EDIT_DIRECT_OPTION,
    auto_subdir: bool | None = EDIT_AUTO_SUBDIR_OPTION,
    verbose: bool = VERBOSE_OPTION,
    dry_run: bool = EDIT_DRY_RUN_OPTION,
    debug: bool = get_debug_option(),
    format: OutputFormat = FORMAT_OPTION,
    version: bool = get_version_option(),
) -> None:
    """Edit configuration for existing applications.

    Update any configuration field by specifying the corresponding option.
    Only the specified fields will be changed - all other settings remain unchanged.
    When multiple applications are specified, the same changes are applied to all.

    BASIC CONFIGURATION:
        --url URL                    Update repository URL
        --download-dir PATH          Update download directory
        --pattern REGEX              Update file pattern
        --enable/--disable           Enable or disable application
        --prerelease/--no-prerelease Enable or disable prereleases

    ROTATION CONFIGURATION:
        --rotation/--no-rotation     Enable or disable file rotation
        --symlink-path PATH          Set symlink path (required for rotation)
        --retain-count N             Number of old files to keep (1-10)

    CHECKSUM CONFIGURATION:
        --checksum/--no-checksum     Enable or disable checksum verification
        --checksum-algorithm ALG     Set algorithm (sha256, sha1, md5)
        --checksum-pattern PATTERN   Set checksum file pattern
        --checksum-required/--checksum-optional  Make verification required/optional

    COMMON EXAMPLES:
        # Enable rotation with symlink
        appimage-updater edit FreeCAD --rotation --symlink-path ~/bin/freecad.AppImage

        # Enable prerelease for multiple apps
        appimage-updater edit OrcaSlicer OrcaSlicerRC --prerelease

        # Update download directory
        appimage-updater edit MyApp --download-dir ~/NewLocation/MyApp --create-dir

        # Configure security settings
        appimage-updater edit OrcaSlicer BambuStudio --no-prerelease --checksum-required

        # Update URL after repository move
        appimage-updater edit OldApp --url https://github.com/newowner/newrepo
    """
    # Validate and prepare
    _validate_edit_options(yes, no)

    if app_names is None:
        _handle_edit_help_display(format)
        return

    # Execute edit command
    _execute_edit_command_workflow(
        app_names,
        config_file,
        config_dir,
        url,
        download_dir,
        basename,
        pattern,
        enable,
        prerelease,
        rotation,
        symlink_path,
        retain_count,
        checksum,
        checksum_algorithm,
        checksum_pattern,
        checksum_required,
        create_dir,
        yes,
        force,
        direct,
        auto_subdir,
        verbose,
        dry_run,
        debug,
        format,
    )

get_debug_option()

Get debug option for commands.

Source code in src/appimage_updater/main.py
def get_debug_option() -> Any:
    """Get debug option for commands."""
    return typer.Option(
        False,
        "--debug",
        help="Enable debug logging",
    )

get_version_option()

Get version option for commands.

Source code in src/appimage_updater/main.py
def get_version_option() -> Any:
    """Get version option for commands."""
    return typer.Option(
        False,
        "--version",
        "-V",
        help="Show version and exit",
        callback=version_callback,
        is_eager=True,
    )

list_apps(config_file=CONFIG_FILE_OPTION, config_dir=CONFIG_DIR_OPTION, debug=get_debug_option(), format=FORMAT_OPTION, version=get_version_option())

List all configured applications.

Shows a summary of all applications in the configuration with their current status.

Source code in src/appimage_updater/main.py
@app.command(name="list")
def list_apps(
    config_file: Path | None = CONFIG_FILE_OPTION,
    config_dir: Path | None = CONFIG_DIR_OPTION,
    debug: bool = get_debug_option(),
    format: OutputFormat = FORMAT_OPTION,
    version: bool = get_version_option(),
) -> None:
    """List all configured applications.

    Shows a summary of all applications in the configuration with their current status.
    """
    command = CommandFactory.create_list_command(
        config_file=config_file,
        config_dir=config_dir,
        debug=debug,
        format=format,
    )

    # Create output formatter and execute with context
    output_formatter = create_output_formatter_from_params(command.params)

    # Handle format-specific finalization
    if format in [OutputFormat.JSON, OutputFormat.HTML]:
        result = asyncio.run(command.execute(output_formatter=output_formatter))
        output_formatter.finalize()
    else:
        result = asyncio.run(command.execute(output_formatter=output_formatter))

    if not result.success:
        raise typer.Exit(result.exit_code)

main(debug=get_debug_option(), version=get_version_option())

AppImage update manager with optional debug logging.

Source code in src/appimage_updater/main.py
@app.callback()
def main(
    debug: bool = get_debug_option(),
    version: bool = get_version_option(),
) -> None:
    """AppImage update manager with optional debug logging."""
    # Store global state
    global_state.debug = debug
    configure_logging(debug=debug)

remove(app_names=_REMOVE_APP_NAME_ARGUMENT_OPTIONAL, config_file=_CONFIG_FILE_OPTION, config_dir=_CONFIG_DIR_OPTION, yes=_YES_OPTION_REMOVE, no=_NO_OPTION_REMOVE, debug=get_debug_option(), format=FORMAT_OPTION, version=get_version_option())

Remove applications from the configuration.

This command will delete the applications' configuration. It does NOT delete downloaded AppImage files or symlinks - only the configuration entries.

BASIC USAGE

appimage-updater remove FreeCAD # Remove single application appimage-updater remove FreeCAD OrcaSlicer # Remove multiple applications

ADVANCED OPTIONS

appimage-updater remove --yes MyApp # Skip confirmation prompt appimage-updater remove --config-dir ~/.config/appimage-updater MyApp

Source code in src/appimage_updater/main.py
@app.command()
def remove(
    app_names: list[str] | None = _REMOVE_APP_NAME_ARGUMENT_OPTIONAL,
    config_file: Path | None = _CONFIG_FILE_OPTION,
    config_dir: Path | None = _CONFIG_DIR_OPTION,
    yes: bool = _YES_OPTION_REMOVE,
    no: bool = _NO_OPTION_REMOVE,
    debug: bool = get_debug_option(),
    format: OutputFormat = FORMAT_OPTION,
    version: bool = get_version_option(),
) -> None:
    """Remove applications from the configuration.

    This command will delete the applications' configuration. It does NOT delete
    downloaded AppImage files or symlinks - only the configuration entries.

    BASIC USAGE:
        appimage-updater remove FreeCAD           # Remove single application
        appimage-updater remove FreeCAD OrcaSlicer  # Remove multiple applications

    ADVANCED OPTIONS:
        appimage-updater remove --yes MyApp       # Skip confirmation prompt
        appimage-updater remove --config-dir ~/.config/appimage-updater MyApp
    """
    # Validate and prepare
    _validate_remove_options(yes, no)

    if app_names is None:
        _handle_remove_help_display(format)
        return

    # Execute remove command
    _execute_remove_command_workflow(app_names, config_file, config_dir, yes, debug, format)

repository(app_names=REPOSITORY_APP_NAME_ARGUMENT, config_file=CONFIG_FILE_OPTION, config_dir=CONFIG_DIR_OPTION, limit=REPOSITORY_LIMIT_OPTION, assets=REPOSITORY_ASSETS_OPTION, dry_run=REPOSITORY_DRY_RUN_OPTION, instrument_http=INSTRUMENT_HTTP_OPTION, http_stack_depth=HTTP_STACK_DEPTH_OPTION, http_track_headers=HTTP_TRACK_HEADERS_OPTION, debug=get_debug_option(), format=FORMAT_OPTION, version=get_version_option())

Examine repository information for configured applications.

Shows detailed information about releases, assets, and repository metadata for the specified applications. Useful for troubleshooting and understanding what versions and files are available.

BASIC USAGE

appimage-updater repository OrcaSlicer # Show release information appimage-updater repository "Orca*" # Use glob patterns

DETAILED INSPECTION

appimage-updater repository OrcaSlicer --assets # Include asset details appimage-updater repository OrcaSlicer --limit 5 # Limit number of releases appimage-updater repository OrcaSlicer --dry-run # Preview without fetching data appimage-updater repository OrcaSlicer --limit 3 --assets # Combined options

Source code in src/appimage_updater/main.py
@app.command()
def repository(
    app_names: list[str] = REPOSITORY_APP_NAME_ARGUMENT,
    config_file: Path | None = CONFIG_FILE_OPTION,
    config_dir: Path | None = CONFIG_DIR_OPTION,
    limit: int = REPOSITORY_LIMIT_OPTION,
    assets: bool = REPOSITORY_ASSETS_OPTION,
    dry_run: bool = REPOSITORY_DRY_RUN_OPTION,
    instrument_http: bool = INSTRUMENT_HTTP_OPTION,
    http_stack_depth: int = HTTP_STACK_DEPTH_OPTION,
    http_track_headers: bool = HTTP_TRACK_HEADERS_OPTION,
    debug: bool = get_debug_option(),
    format: OutputFormat = FORMAT_OPTION,
    version: bool = get_version_option(),
) -> None:
    """Examine repository information for configured applications.

    Shows detailed information about releases, assets, and repository metadata
    for the specified applications. Useful for troubleshooting and understanding
    what versions and files are available.

    BASIC USAGE:
        appimage-updater repository OrcaSlicer        # Show release information
        appimage-updater repository "Orca*"          # Use glob patterns

    DETAILED INSPECTION:
        appimage-updater repository OrcaSlicer --assets    # Include asset details
        appimage-updater repository OrcaSlicer --limit 5   # Limit number of releases
        appimage-updater repository OrcaSlicer --dry-run   # Preview without fetching data
        appimage-updater repository OrcaSlicer --limit 3 --assets  # Combined options
    """
    command = CommandFactory.create_repository_command(
        app_names=app_names,
        config_file=config_file,
        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,
        debug=debug,
        format=format,
    )

    # Create output formatter and execute with context
    output_formatter = create_output_formatter_from_params(command.params)

    # Handle format-specific finalization
    if format in [OutputFormat.JSON, OutputFormat.HTML]:
        result = asyncio.run(command.execute(output_formatter=output_formatter))
        output_formatter.finalize()
    else:
        result = asyncio.run(command.execute(output_formatter=output_formatter))

    if not result.success:
        raise typer.Exit(result.exit_code)

show(app_names=_SHOW_APP_NAME_ARGUMENT_OPTIONAL, config_file=_CONFIG_FILE_OPTION, config_dir=_CONFIG_DIR_OPTION, debug=get_debug_option(), format=FORMAT_OPTION, version=get_version_option())

Show detailed information about a specific application.

BASIC USAGE

appimage-updater show FreeCAD # Show single application appimage-updater show FreeCAD OrcaSlicer # Show multiple applications

CUSTOM CONFIG

appimage-updater show --config-dir ~/.config/appimage-updater OrcaSlicer

Source code in src/appimage_updater/main.py
@app.command()
def show(
    app_names: list[str] | None = _SHOW_APP_NAME_ARGUMENT_OPTIONAL,
    config_file: Path | None = _CONFIG_FILE_OPTION,
    config_dir: Path | None = _CONFIG_DIR_OPTION,
    debug: bool = get_debug_option(),
    format: OutputFormat = FORMAT_OPTION,
    version: bool = get_version_option(),
) -> None:
    """Show detailed information about a specific application.

    BASIC USAGE:
        appimage-updater show FreeCAD                 # Show single application
        appimage-updater show FreeCAD OrcaSlicer      # Show multiple applications

    CUSTOM CONFIG:
        appimage-updater show --config-dir ~/.config/appimage-updater OrcaSlicer
    """
    command = CommandFactory.create_show_command(
        app_names=app_names,
        config_file=config_file,
        config_dir=config_dir,
        debug=debug,
        format=format,
    )

    # Create output formatter and execute with context
    output_formatter = create_output_formatter_from_params(command.params)

    # Show help if no app names are provided
    if app_names is None:
        if format in [OutputFormat.JSON, OutputFormat.HTML]:
            # For structured formats, use the output formatter
            output_formatter.print_info("Usage: appimage-updater show [OPTIONS] APP_NAMES...")
            output_formatter.print_info("")
            output_formatter.print_info("Show detailed information about a specific application.")
            output_formatter.print_info("")
            output_formatter.print_info("Arguments:")
            output_formatter.print_info("  APP_NAMES...  Names of applications to display information for")
            output_formatter.print_info("                (case-insensitive, supports glob patterns like 'Orca*').")
            output_formatter.print_info("                Multiple names can be specified.")
            output_formatter.print_info("")
            output_formatter.print_info("Examples:")
            output_formatter.print_info("  appimage-updater show FreeCAD")
            output_formatter.print_info("  appimage-updater show FreeCAD OrcaSlicer")
            output_formatter.print_info("  appimage-updater show 'Orca*'")
            output_formatter.finalize()
        else:
            # For console formats, use typer.echo
            typer.echo("Usage: appimage-updater show [OPTIONS] APP_NAMES...")
            typer.echo("")
            typer.echo("Show detailed information about a specific application.")
            typer.echo("")
            typer.echo("Arguments:")
            typer.echo("  APP_NAMES...  Names of applications to display information for")
            typer.echo("                (case-insensitive, supports glob patterns like 'Orca*').")
            typer.echo("                Multiple names can be specified.")
            typer.echo("")
            typer.echo("Examples:")
            typer.echo("  appimage-updater show FreeCAD")
            typer.echo("  appimage-updater show FreeCAD OrcaSlicer")
            typer.echo("  appimage-updater show 'Orca*'")
        raise typer.Exit(0)

    # Handle format-specific finalization
    if format in [OutputFormat.JSON, OutputFormat.HTML]:
        result = asyncio.run(command.execute(output_formatter=output_formatter))
        output_formatter.finalize()
    else:
        result = asyncio.run(command.execute(output_formatter=output_formatter))

    if not result.success:
        raise typer.Exit(result.exit_code)

version_callback(value)

Callback for --version option.

Source code in src/appimage_updater/main.py
def version_callback(value: bool) -> None:
    """Callback for --version option."""
    if value:
        console.print(f"AppImage Updater {__version__}")
        raise typer.Exit()