CLI Installation
This page explains how to install, upgrade, and uninstall the CLI.
The supported Python versions are 3.8*, 3.9, 3.10, 3.11 and 3.12.
Python 3.8
Starting with CLI version 1.13, Python 3.8 is not going to be supported.
Usage in WSL
For a smooth authentication experience, we highly recommend installing wslu
in your WSL environment. This utility allows you to open a web browser from inside WSL. To install wslu
, run the following command:
sudo apt install wslu
Refer to the KX Downloads Portal for the available versions.
Install
To install the CLI from the KX Downloads Portal, use one of the following commands with the appropriate credentials.
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
- 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.
-
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
.uv tool install -p 3.11 --extra-index-url https://portal.dl.kx.com/assets/pypi kxicli --force
To install a specific version, run:
KXI_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.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."Note
pipx
must be available on your PATH.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:pipx install kxicli --pip-args="--no-input --extra-index-url https://portal.dl.kx.com/assets/pypi/" --force
To install a specific version, run:
KXI_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.
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.
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:pip --no-input install --extra-index-url https://portal.dl.kx.com/assets/pypi/ kxicli
To install a specific version, run:
KXI_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.
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 tool install -p 3.11 --extra-index-url https://portal.dl.kx.com/assets/pypi kxicli --upgrade --force
pipx upgrade kxicli --pip-args="--no-input --extra-index-url https://portal.dl.kx.com/assets/pypi/ kxicli" --force
# 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 tool uninstall kxicli
pipx uninstall kxicli
pip uninstall kxicli
Air-gapped environments
By default, pip
installs dependencies from the internet. To install the CLI in an air-gapped environment, 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
pip --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 ittar -zxf bundle.tar.gz pip install --no-index --find-links bundle kxicli
Target environment
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.