CLI Installation
This page explains how to install, upgrade, and uninstall the KXI Command Line Interface (CLI).
The supported Python versions are 3.9, 3.10, 3.11 and 3.12.
Note
If you are using Windows Subsystem for Linux (WSL), we recommend installing wslu
to simplify authentication. This utility allows you to open a web browser directly from within WSL. To install wslu
, run the following command:
bash
sudo apt install wslu
Refer to the KX Downloads Portal for the available versions.
Install
Note
Supported platforms: You can set up the CLI on both Windows and Linux.
To install the CLI from the KX Downloads Portal, use one of the following commands with the appropriate credentials.
uv
pipx
pip
Use the UV Package manager for installation. This tool doesn't have any prerequisites. You can install the CLI without Python on your system.
-
Install UV if you don't already have it. We suggest using
winget
for windows andbrew
for MacOS/Linux as they automatically install the tool on the Path.-
For Windows:
winget install uv
-
For macOS/Linux: brew install uv
-
-
Install the CLI with UV into a separate 3.11 Python environment:
Note
You can configure the CLI to use a different Python version by changing
-p 3.11
.shell
Copyuv tool install -p 3.11 --extra-index-url https://portal.dl.kx.com/assets/pypi kxicli --force
To install a specific version, run:
bash
CopyKXI_CLI_VERSION=x.y.z # replace with the version you want to install
uv tool install -p 3.11 --extra-index-url https://portal.dl.kx.com/assets/pypi kxicli=="$KXI_CLI_VERSION" --force
-
Ensure you have one of the supported Python versions above on your system.
-
Install pipx on your system.
-
Make sure you have the latest version of
pipx
. -
Ensure
pipx
is running with the expected Python version.Note
Which Python version is
pipx
using ?Check the output of
pipx environment
look at the value ofPIPX_DEFAULT_PYTHON
. If this is wrong, download the correct Python version and set the environment variablePIPX_DEFAULT_PYTHON
to the location of that Python executable."Important
pipx
must be available on your PATH.Warning
If you have previously used
pip
to install the CLI you must runpip uninstall kxicli
before installing withpipx
to remove the old version from the PATH -
To install the CLI from the KX Downloads Portal, run
pipx install
as follows:bash
Copypipx install kxicli --pip-args="--no-input --extra-index-url https://portal.dl.kx.com/assets/pypi/" --force
To install a specific version, run:
bash
CopyKXI_CLI_VERSION=x.y.z # replace with the version you want to install
pipx install kxicli --pip-args="--no-input --extra-index-url https://portal.dl.kx.com/assets/pypi/ kxicli==$KXI_CLI_VERSION" --force
If the installation fails, you can run pipx
with the --verbose
modifier to find more information.
shell
pipx install kxicli --verbose --pip-args="--no-input --extra-index-url https://portal.dl.kx.com/assets/pypi/" --force
Warning
This method should only be used by developers familiar with the Python ecosystem.
-
You need to install Python and the Python package manager pip on your system.
Note
Python and pip command names
python
andpip
must be available on your PATH. If alternative commands such aspython3
are required, update the commands appropriately. -
To install the CLI from the KX Downloads Portal, run
pip install
as follows:bash
Copypip --no-input install --extra-index-url https://portal.dl.kx.com/assets/pypi/ kxicli
To install a specific version, run:
bash
CopyKXI_CLI_VERSION=x.y.z # replace with the version you want to install
pip --no-input install --extra-index-url https://portal.dl.kx.com/assets/pypi/ kxicli==$KXI_CLI_VERSION
If the installation fails, you can run pip
with the --verbose
modifier to find more information.
shell
pip --no-input install --verbose --extra-index-url https://portal.dl.kx.com/assets/pypi/ kxicli==$KXI_CLI_VERSION
Once installed, kxi
is available for you to execute.
Upgrade
To upgrade the CLI, run one of the following commands as shown in the examples below:
uv
pipx
pip
bash
uv tool install -p 3.11 --extra-index-url https://portal.dl.kx.com/assets/pypi kxicli --upgrade --force
bash
pipx upgrade kxicli --pip-args="--no-input --extra-index-url https://portal.dl.kx.com/assets/pypi/ kxicli" --force
bash
# pass the '--upgrade' flag to pip
pip --no-input install --upgrade --extra-index-url https://portal.dl.kx.com/assets/pypi/ kxicli
Uninstall
To uninstall the CLI, run one of the following commands as in the below examples:
uv
pipx
pip
bash
uv tool uninstall kxicli
bash
pipx uninstall kxicli
bash
pip uninstall kxicli
Air-gapped environments
By default, pip
installs dependencies from the internet. To install the CLI in an air-gapped environment, where internet access is restricted, you must download the dependencies on a machine connected to the internet and transfer the dependencies to the air-gapped environment.
-
Download the CLI and dependencies on an internet-enabled machine
shell
Copypip --no-input download -d bundle setuptools wheel --extra-index-url https://portal.dl.kx.com/assets/pypi/ kxicli
tar -zcf bundle.tar.gz bundle -
Copy
bundle.tar.gz
to your air-gapped environment and run these commands to install itshell
Copytar -zxf bundle.tar.gz
pip install --no-index --find-links bundle kxicli
Note
The above commands assume the interpreter and system that the dependencies are downloaded on match those of the target environment. If this is not the case, use the --platform
, --python-version
, --implementation
, and --abi
options to fetch the dependencies matching the target environment.