Pyflyte CLI
The pyflyte
CLI is the main tool developers use to interact with Flyte on the command line.
Installation
The recommended way to install the union CLI outside a workflow project is to use uv
:
$ uv tool install flytekit
This will install the pyflyte
CLI globally on your system as a uv
tool.
Configure the pyflyte
CLI
These command will create the file ~/.flyte/config.yaml
with the configuration information to connect to the Flyte instance.
See Getting started > Local setup for more details.
Overriding the configuration file location
By default, the pyflyte
CLI will look for a configuration file at ~/.flyte/config.yaml
.
You can override this behavior to specify a different configuration file by setting the FLYTECTL_CONFIG
environment variable:
export FLYTECTL_CONFIG=~/.my-config-location/my-config.yaml
Alternatively, you can always specify the configuration file on the command line when invoking pyflyte
by using the --config
flag:
$ pyflyte --config ~/.my-config-location/my-config.yaml run my_script.py my_workflow
pyflyte
CLI configuration search path
The pyflyte
CLI will check for configuration files as follows:
First, if a --config
option is used, it will use the specified config file.
FLYTECTL_CONFIG
environment variable.Third, the following hard-coded locations (in this order):
~/.flyte/config.yaml
.If none of these are present, the CLI will raise an error.