airbyte_cdk.cli.airbyte_cdk
CLI commands for airbyte-cdk
.
This CLI interface allows you to interact with your connector, including testing and running commands.
Basic Usage:
airbyte-cdk --help
airbyte-cdk --version
airbyte-cdk connector --help
airbyte-cdk manifest --help
Running Statelessly:
You can run the latest version of this CLI, from any machine, using pipx
or uvx
:
# Run the latest version of the CLI:
pipx run airbyte-cdk connector --help
uvx airbyte-cdk connector --help
# Run from a specific CDK version:
pipx run airbyte-cdk==6.5.1 connector --help
uvx airbyte-cdk==6.5.1 connector --help
Running within your virtualenv:
You can also run from your connector's virtualenv:
poetry run airbyte-cdk connector --help
1# Copyright (c) 2025 Airbyte, Inc., all rights reserved. 2"""CLI commands for `airbyte-cdk`. 3 4This CLI interface allows you to interact with your connector, including 5testing and running commands. 6 7**Basic Usage:** 8 9```bash 10airbyte-cdk --help 11airbyte-cdk --version 12airbyte-cdk connector --help 13airbyte-cdk manifest --help 14``` 15 16**Running Statelessly:** 17 18You can run the latest version of this CLI, from any machine, using `pipx` or `uvx`: 19 20```bash 21# Run the latest version of the CLI: 22pipx run airbyte-cdk connector --help 23uvx airbyte-cdk connector --help 24 25# Run from a specific CDK version: 26pipx run airbyte-cdk==6.5.1 connector --help 27uvx airbyte-cdk==6.5.1 connector --help 28``` 29 30**Running within your virtualenv:** 31 32You can also run from your connector's virtualenv: 33 34```bash 35poetry run airbyte-cdk connector --help 36``` 37 38""" 39 40from typing import cast 41 42import rich_click as click 43 44from airbyte_cdk.cli.airbyte_cdk._connector import connector_cli_group 45from airbyte_cdk.cli.airbyte_cdk._image import image_cli_group 46from airbyte_cdk.cli.airbyte_cdk._manifest import manifest_cli_group 47from airbyte_cdk.cli.airbyte_cdk._secrets import secrets_cli_group 48from airbyte_cdk.cli.airbyte_cdk._version import print_version 49 50 51@click.group( 52 help=__doc__.replace("\n", "\n\n"), # Render docstring as help text (markdown) 53 invoke_without_command=True, 54) 55@click.option( 56 "--version", 57 is_flag=True, 58 help="Show the version of the Airbyte CDK.", 59) 60@click.pass_context 61def cli( 62 ctx: click.Context, 63 version: bool, 64) -> None: 65 """Airbyte CDK CLI. 66 67 Help text is provided from the file-level docstring. 68 """ 69 if version: 70 print_version(short=False) 71 ctx.exit() 72 73 if ctx.invoked_subcommand is None: 74 # If no subcommand is provided, show the help message. 75 click.echo(ctx.get_help()) 76 ctx.exit() 77 78 79cli.add_command(connector_cli_group) 80cli.add_command(manifest_cli_group) 81cli.add_command(image_cli_group) 82cli.add_command(secrets_cli_group) 83 84 85if __name__ == "__main__": 86 cli()
cli =
<RichGroup cli>
Airbyte CDK CLI.
Help text is provided from the file-level docstring.