airbyte_ops_mcp.cli.dockerhub

CLI commands for DockerHub operations.

This module provides CLI wrappers for DockerHub image operations.

Commands:

airbyte-ops dockerhub inspect-image - Inspect Docker image on DockerHub

CLI reference

The commands below are regenerated by poe docs-generate via cyclopts's programmatic docs API; see docs/generate_cli.py.

airbyte-ops dockerhub COMMAND

DockerHub image operations.

Commands:

airbyte-ops dockerhub inspect-image

airbyte-ops dockerhub inspect-image IMAGE TAG

Check if a Docker image exists on DockerHub.

Returns information about the image if it exists, or indicates if it doesn't exist. Useful for confirming that a pre-release connector was successfully published.

Parameters:

  • IMAGE, --image: Docker image name (e.g., 'airbyte/source-github'). [required]
  • TAG, --tag: Image tag (e.g., '2.1.5-preview.abc1234'). [required]
 1# Copyright (c) 2025 Airbyte, Inc., all rights reserved.
 2"""CLI commands for DockerHub operations.
 3
 4This module provides CLI wrappers for DockerHub image operations.
 5
 6Commands:
 7    airbyte-ops dockerhub inspect-image - Inspect Docker image on DockerHub
 8
 9## CLI reference
10
11The commands below are regenerated by `poe docs-generate` via cyclopts's
12programmatic docs API; see `docs/generate_cli.py`.
13
14.. include:: ../../../docs/generated/cli/dockerhub.md
15   :start-line: 2
16"""
17
18from __future__ import annotations
19
20# Hide Python-level members from the pdoc page for this module; the rendered
21# docs for this CLI group come entirely from the grafted `.. include::` in
22# the module docstring above.
23__all__: list[str] = []
24
25from typing import Annotated
26
27from cyclopts import Parameter
28
29from airbyte_ops_mcp.cli._base import App, app
30from airbyte_ops_mcp.cli._shared import (
31    print_error,
32    print_json,
33    print_success,
34)
35from airbyte_ops_mcp.mcp.github_actions import get_docker_image_info
36
37# Create the dockerhub sub-app
38dockerhub_app = App(name="dockerhub", help="DockerHub image operations.")
39app.command(dockerhub_app)
40
41
42@dockerhub_app.command(name="inspect-image")
43def inspect_image(
44    image: Annotated[
45        str,
46        Parameter(help="Docker image name (e.g., 'airbyte/source-github')."),
47    ],
48    tag: Annotated[
49        str,
50        Parameter(help="Image tag (e.g., '2.1.5-preview.abc1234')."),
51    ],
52) -> None:
53    """Check if a Docker image exists on DockerHub.
54
55    Returns information about the image if it exists, or indicates if it doesn't exist.
56    Useful for confirming that a pre-release connector was successfully published.
57    """
58    result = get_docker_image_info(
59        image=image,
60        tag=tag,
61    )
62    if result.exists:
63        print_success(f"Image {result.full_name} exists.")
64    else:
65        print_error(f"Image {result.full_name} not found.")
66    print_json(result.model_dump())