Skip to main content

main

The Flyte CLI is the command line interface for working with the Flyte SDK and backend.

It follows a simple verb/noun structure, where the top-level commands are verbs that describe the action to be taken, and the subcommands are nouns that describe the object of the action.

The root command can be used to configure the CLI for persistent settings, such as the endpoint, organization, and verbosity level.

Set endpoint and organization:

$ flyte --endpoint < endpoint > --org < org > get project < project_name >

Increase verbosity level (This is useful for debugging, this will show more logs and exception traces):

$ flyte -vvv get logs < run-name >

Override the default config file:

$ flyte --config /path/to/config.yaml run ...
def main(
ctx: click.Context,
endpoint: str | None,
insecure: bool,
image_builder: str | None,
verbose: int,
log_format: LogFormat,
reset_root_logger: bool,
org: str | None,
config_file: str | None,
auth_type: str | None,
output_format: common.OutputFormat
) - > null

The Flyte CLI is the command line interface for working with the Flyte SDK and backend. It follows a simple verb/noun structure, where the top-level commands are verbs that describe the action to be taken, and the subcommands are nouns that describe the object of the action. The root command can be used to configure the CLI for persistent settings, such as the endpoint, organization, and verbosity level.

Parameters

NameTypeDescription
ctxclick.ContextThe Click context object used to store and propagate configuration state to subcommands.
endpoint`strNone`
insecureboolIf true, establishes an unencrypted connection to the endpoint instead of using TLS.
image_builder`strNone`
verboseintThe verbosity level count (e.g., -vvv) used to determine log levels and visibility of exception traces.
log_formatLogFormatThe structural format of log output, either 'console' for human readability or 'json' for machine parsing.
reset_root_loggerboolWhen enabled, forces the root logger to adopt the Flyte-specific logging style and configuration.
org`strNone`
config_file`strNone`
auth_type`strNone`
output_formatcommon.OutputFormatThe visual style for command results, determining whether to use 'table' (rich) or 'json/yaml' (plain) output.

Returns

TypeDescription
nullNo value is returned; the function initializes the CLI context and logger for subcommand execution.