title: Pyflyte CLI weight: 3 variants: +flyte -serverless -byoc -byok
Union CLI
The union
CLI is the main tool developers use to interact with Union.ai on the command line.
Installation
The recommended way to install the union CLI outside a workflow project is to use uv
:
$ uv tool install union
This will install the union
CLI globally on your system as a uv
tool.
Configure the union
CLI
To configure the union
CLI to connect to you Union.ai BYOC or BYOK instance, run the following command:
$ union create login --host <union-host-url>
where <union-host-url>
is the URL of your Union.ai instance.
These command will create the file ~/.union/config.yaml
with the configuration information to connect to the Union.ai instance.
See Getting started > Local setup for more details.
Overriding the configuration file location
By default, the union
CLI will look for a configuration file at ~/.union/config.yaml
.
You can override this behavior to specify a different configuration file by setting the UNION_CONFIG
environment variable:
export UNION_CONFIG=~/.my-config-location/my-config.yaml
Alternatively, you can always specify the configuration file on the command line when invoking union
by using the --config
flag:
$ union --config ~/.my-config-location/my-config.yaml run my_script.py my_workflow
union
CLI configuration search path
The union
CLI will check for configuration files as follows:
First, if a --config
option is used, it will use the specified config file.
Second, the config files pointed to by the following environment variables (in this order):
UNION_CONFIG
UNIONAI_CONFIG
UCTL_CONFIG
Third, the following hard-coded locations (in this order):
Third, the following hard-coded locations (in this order):
~/.union/config.yaml
~/.uctl/config.yaml
If none of these are present, the CLI will raise an error.