Skip to content

CLI Reference

This page provides documentation for our command line tools.

kxi

KX Insights CLI

Usage:

kxi [OPTIONS] COMMAND [ARGS]...

Options:

  --version       Show the version and exit.
  --debug         Enable debug logging.
  --profile TEXT  Name of configuration profile to use.
  --help          Show this message and exit.

kxi assembly

Assembly interaction commands

Usage:

kxi assembly [OPTIONS] COMMAND [ARGS]...

Options:

  --help  Show this message and exit.

kxi assembly backup

Back up running assemblies to a file

Usage:

kxi assembly backup [OPTIONS]

Options:

  --namespace TEXT  Kubernetes namespace
  --filepath TEXT   Filepath to store state of running assemblies
  --force           Perform action without prompting for confirmation
  --help            Show this message and exit.

kxi assembly deploy

Create an assembly given an assembly file

Usage:

kxi assembly deploy [OPTIONS]

Options:

  --hostname, --ingress-host TEXT
                                  Hostname of Insights deployment
  --client-id TEXT                Client ID to request an access token with
  --client-secret TEXT            Client secret to request an access token
                                  with
  --realm TEXT                    Name of Keycloak realm
  --namespace TEXT                Kubernetes namespace
  --filepath TEXT                 Filepath to store state of running
                                  assemblies
  --use-kubeconfig                Communicate directly with kubernetes plane
  --wait                          Wait for assembly to reach "Ready" state
  --help                          Show this message and exit.

kxi assembly list

List assemblies

Usage:

kxi assembly list [OPTIONS]

Options:

  --hostname, --ingress-host TEXT
                                  Hostname of Insights deployment
  --client-id TEXT                Client ID to request an access token with
  --client-secret TEXT            Client secret to request an access token
                                  with
  --realm TEXT                    Name of Keycloak realm
  --namespace TEXT                Kubernetes namespace
  --use-kubeconfig                Communicate directly with kubernetes plane
  --help                          Show this message and exit.

kxi assembly status

Print status of the assembly

Usage:

kxi assembly status [OPTIONS]

Options:

  --namespace TEXT                Kubernetes namespace
  --name TEXT                     Name of the assembly get the status of
                                  [required]
  --wait-for-ready                Wait for assembly to reach "Ready" state
  --hostname, --ingress-host TEXT
                                  Hostname of Insights deployment
  --client-id TEXT                Client ID to request an access token with
  --client-secret TEXT            Client secret to request an access token
                                  with
  --realm TEXT                    Name of Keycloak realm
  --use-kubeconfig                Communicate directly with kubernetes plane
  --help                          Show this message and exit.

kxi assembly teardown

Tears down an assembly given its name

Usage:

kxi assembly teardown [OPTIONS]

Options:

  --namespace TEXT                Kubernetes namespace
  --name TEXT                     Name of the assembly to torn down
                                  [required]
  --wait                          Wait for all pods to be torn down
  --force                         Perform action without prompting for
                                  confirmation
  --hostname, --ingress-host TEXT
                                  Hostname of Insights deployment
  --client-id TEXT                Client ID to request an access token with
  --client-secret TEXT            Client secret to request an access token
                                  with
  --realm TEXT                    Name of Keycloak realm
  --use-kubeconfig                Communicate directly with kubernetes plane
  --help                          Show this message and exit.

kxi auth

Authentication and authorization commands

Usage:

kxi auth [OPTIONS] COMMAND [ARGS]...

Options:

  --help  Show this message and exit.

kxi auth get-access-token

Get an access token for a client id and secret

Usage:

kxi auth get-access-token [OPTIONS]

Options:

  --hostname TEXT       Hostname of Insights deployment
  --client-id TEXT      Client ID to request access token for
  --client-secret TEXT  Client secret to request access token
  --realm TEXT          Name of Keycloak realm
  --help                Show this message and exit.

kxi auth get-admin-token

Get an admin access token for the Keycloak Admin API

Usage:

kxi auth get-admin-token [OPTIONS]

Options:

  --hostname TEXT  Hostname of Insights deployment
  --username TEXT  Keycloak admin username  [required]
  --password TEXT  Keycloak admin password  [required]
  --help           Show this message and exit.

kxi azure

Insights Azure related commands

Usage:

kxi azure [OPTIONS] COMMAND [ARGS]...

Options:

  --help  Show this message and exit.

kxi azure assembly

Assembly related commands

Usage:

kxi azure assembly [OPTIONS] COMMAND [ARGS]...

Options:

  --help  Show this message and exit.
kxi azure assembly backup

Backup assemblies

Usage:

kxi azure assembly backup [OPTIONS]

Options:

  --namespace TEXT                Kubernetes namespace
  --assembly-backup-filepath TEXT
                                  Filepath to store state of running
                                  assemblies
  --help                          Show this message and exit.
kxi azure assembly delete

Delete assemblies

Usage:

kxi azure assembly delete [OPTIONS]

Options:

  --namespace TEXT  Kubernetes namespace
  --force           Perform action without prompting for confirmation
  --help            Show this message and exit.
kxi azure assembly restore

Restore assemblies

Usage:

kxi azure assembly restore [OPTIONS]

Options:

  --namespace TEXT                Kubernetes namespace
  --assembly-backup-filepath TEXT
                                  Filepath to store state of running
                                  assemblies
  --force                         Perform action without prompting for
                                  confirmation
  --help                          Show this message and exit.

kxi azure install

Install KX Insights

Usage:

kxi azure install [OPTIONS]

Options:

  --namespace TEXT                Kubernetes namespace
  --operator-namespace TEXT       Kubernetes namespace
  --release TEXT                  Release name for the install
  --operator-release TEXT         Release name for the install
  --version TEXT                  Version to install  [required]
  --operator-version TEXT         Version of the operator to install
                                  [required]
  --filepath PATH                 Values file to install with
  --values-url TEXT               Values URL to install with
  --assembly-backup-filepath TEXT
                                  Filepath to store state of running
                                  assemblies
  --force                         Perform action without prompting for
                                  confirmation
  --help                          Show this message and exit.

kxi azure uninstall

Uninstall KX Insights

Usage:

kxi azure uninstall [OPTIONS]

Options:

  --namespace TEXT                Kubernetes namespace
  --operator-namespace TEXT       Kubernetes namespace
  --release TEXT                  Release name for the install
  --operator-release TEXT         Release name for the install
  --assembly-backup-filepath TEXT
                                  Filepath to store state of running
                                  assemblies
  --force                         Perform action without prompting for
                                  confirmation
  --help                          Show this message and exit.

kxi azure upgrade

Upgrade KX Insights

Usage:

kxi azure upgrade [OPTIONS]

Options:

  --namespace TEXT                Kubernetes namespace
  --operator-namespace TEXT       Kubernetes namespace
  --release TEXT                  Release name for the install
  --operator-release TEXT         Release name for the install
  --version TEXT                  Version to install  [required]
  --operator-version TEXT         Version of the operator to install
                                  [required]
  --filepath PATH                 Values file to install with
  --values-url TEXT               Values URL to install with
  --assembly-backup-filepath TEXT
                                  Filepath to store state of running
                                  assemblies
  --force                         Perform action without prompting for
                                  confirmation
  --help                          Show this message and exit.

kxi client

Commands for interacting with clients

Usage:

kxi client [OPTIONS] COMMAND [ARGS]...

Options:

  --help  Show this message and exit.

kxi client enrol

Enrol a client in the system

Usage:

kxi client enrol [OPTIONS]

Options:

  --hostname TEXT       Hostname of Insights deployment
  --name TEXT           Name of client to enrol  [required]
  --insert-topic TEXT   Topic to insert data on  [required]
  --client-id TEXT      Client ID to request an access token with
  --client-secret TEXT  Client secret to request access token
  --realm TEXT          Name of Keycloak realm
  --help                Show this message and exit.

kxi client info

Get certs and endpoints for a client

Usage:

kxi client info [OPTIONS]

Options:

  --hostname TEXT  Hostname of Insights deployment
  --uid TEXT       Client UID to request info for  [required]
  --help           Show this message and exit.

kxi client list

List Keycloak clients in the system

Usage:

kxi client list [OPTIONS]

Options:

  --hostname TEXT  Hostname of Insights deployment
  --realm TEXT     Name of Keycloak realm
  --username TEXT  Keycloak admin username  [required]
  --password TEXT  Keycloak admin password  [required]
  --help           Show this message and exit.

kxi client remove

Remove a client from the system

Usage:

kxi client remove [OPTIONS]

Options:

  --hostname TEXT       Hostname of Insights deployment
  --name TEXT           Name of the client to remove  [required]
  --client-id TEXT      Client ID to request an access token with
  --client-secret TEXT  Client secret to request access token with
  --realm TEXT          Name of Keycloak realm
  --help                Show this message and exit.

kxi configure

Configure the CLI

Usage:

kxi configure [OPTIONS]

Options:

  --profile TEXT  Name of profile to configure.
  --help          Show this message and exit.

kxi install

Insights installation commands

Usage:

kxi install [OPTIONS] COMMAND [ARGS]...

Options:

  --help  Show this message and exit.

kxi install delete

Uninstall KX Insights

Usage:

kxi install delete [OPTIONS]

Options:

  --release TEXT        Release name for the install
  --namespace TEXT      Kubernetes namespace
  --force               Perform action without prompting for confirmation
  --uninstall-operator  Remove KXI Operator installation
  --help                Show this message and exit.

kxi install get-values

Display the kxi-install-config secret used for storing installation values

Usage:

kxi install get-values [OPTIONS]

Options:

  --namespace TEXT              Kubernetes namespace
  --install-config-secret TEXT  Secret containing helm install values
  --help                        Show this message and exit.

kxi install list-versions

List available versions of KX Insights

Usage:

kxi install list-versions [OPTIONS]

Options:

  --chart-repo-name TEXT  Name for chart repository
  --help                  Show this message and exit.

kxi install run

Install KX Insights with a values file

Usage:

kxi install run [OPTIONS]

Options:

  --namespace TEXT                Kubernetes namespace
  --chart-repo-name TEXT          Name for chart repository
  --chart-repo-url TEXT           Repository URL to pull charts from
  --chart-repo-username TEXT      Username for the chart repository
  --license-secret TEXT           Secret containing kdb+ license
  --license-as-env-var BOOLEAN    Mount kdb+ license secret as an environment
                                  variable
  --license-filepath TEXT         File path and file name of kdb+ license file
  --client-cert-secret TEXT       Secret containing TLS cert and key for
                                  client issuer
  --image-repo TEXT               Repository to pull images from
  --image-repo-user TEXT          User name for image repository
  --image-pull-secret TEXT        Secret containing credentials for the image
                                  repository
  --gui-client-secret TEXT        Keycloak client secret for gui service
                                  account
  --operator-client-secret TEXT   Keycloak client secret for operator service
                                  account
  --keycloak-secret TEXT          Secret containing Keycloak admin password
  --keycloak-postgresql-secret TEXT
                                  Secret containing Keycloak postgresql
                                  passwords
  --keycloak-auth-url TEXT        Auth URL for Keycloak
  --hostname, --ingress-host TEXT
                                  Hostname of Insights deployment
  --ingress-cert-secret TEXT      Secret containing self-managed TLS cert and
                                  key for the ingress
  --ingress-cert TEXT             File path to TLS certificate for the ingress
  --ingress-key TEXT              File path to TLS private key for the ingress
  --output-file TEXT              Name for the generated values file
  --install-config-secret TEXT    Secret containing helm install values
  --filepath PATH                 Values file to install with
  --release TEXT                  Release name for the install
  --version TEXT                  Version to install  [required]
  --operator-version TEXT         Version of the operator to install
  --force                         Perform action without prompting for
                                  confirmation
  --help                          Show this message and exit.

kxi install setup

Perform necessary setup steps to install Insights

Usage:

kxi install setup [OPTIONS]

Options:

  --namespace TEXT                Kubernetes namespace
  --chart-repo-name TEXT          Name for chart repository
  --chart-repo-url TEXT           Repository URL to pull charts from
  --chart-repo-username TEXT      Username for the chart repository
  --license-secret TEXT           Secret containing kdb+ license
  --license-as-env-var BOOLEAN    Mount kdb+ license secret as an environment
                                  variable
  --license-filepath TEXT         File path and file name of kdb+ license file
  --client-cert-secret TEXT       Secret containing TLS cert and key for
                                  client issuer
  --image-repo TEXT               Repository to pull images from
  --image-repo-user TEXT          User name for image repository
  --image-pull-secret TEXT        Secret containing credentials for the image
                                  repository
  --gui-client-secret TEXT        Keycloak client secret for gui service
                                  account
  --operator-client-secret TEXT   Keycloak client secret for operator service
                                  account
  --keycloak-secret TEXT          Secret containing Keycloak admin password
  --keycloak-postgresql-secret TEXT
                                  Secret containing Keycloak postgresql
                                  passwords
  --keycloak-auth-url TEXT        Auth URL for Keycloak
  --hostname, --ingress-host TEXT
                                  Hostname of Insights deployment
  --ingress-cert-secret TEXT      Secret containing self-managed TLS cert and
                                  key for the ingress
  --ingress-cert TEXT             File path to TLS certificate for the ingress
  --ingress-key TEXT              File path to TLS private key for the ingress
  --output-file TEXT              Name for the generated values file
  --install-config-secret TEXT    Secret containing helm install values
  --help                          Show this message and exit.

kxi install upgrade

Usage:

kxi install upgrade [OPTIONS]

Options:

  --namespace TEXT                Kubernetes namespace
  --release TEXT                  Release name for the install
  --chart-repo-name TEXT          Name for chart repository
  --assembly-backup-filepath TEXT
                                  Filepath to store state of running
                                  assemblies
  --version TEXT                  Version to install  [required]
  --operator-version TEXT         Version of the operator to install
  --image-pull-secret TEXT        Secret containing credentials for the image
                                  repository
  --license-secret TEXT           Secret containing kdb+ license
  --install-config-secret TEXT    Secret containing helm install values
  --filepath PATH                 Values file to install with
  --force                         Perform action without prompting for
                                  confirmation
  --help                          Show this message and exit.

kxi package

KX Package Import/Export CLI.

Usage:

kxi package [OPTIONS] COMMAND [ARGS]...

Options:

  --version                   Version Info
  --artifact-store DIRECTORY  Directory in which to store package
                              artifact;[default] $KX_ARTIFACT_PATH
  --pkg-lib DIRECTORY         Directory in which packages will be
                              installed;[default] $KX_PACKAGE_PATH
  --debug                     Enable stacktrace prints for easier debugging
  --help                      Show this message and exit.

kxi package add

Add an entity to the package.

Usage:

kxi package add [OPTIONS] COMMAND [ARGS]...

Options:

  --to <Package>  The package to which you will add an entity.
  --help          Show this message and exit.
kxi package add dep

Add a package dependency to the package.

Usage:

kxi package add dep [OPTIONS]

Options:

  --name TEXT      The name of the dependent package
  --version TEXT   The version of the dependent package
  --repo TEXT      The repository of the dependent package
  --location TEXT  The location of the dependent package
  --path TEXT      The path to the local dependent package
  --help           Show this message and exit.
kxi package add entitlements

Add entitlements to the package.

Usage:

kxi package add entitlements [OPTIONS]

Options:

  --read TEXT   Read entitlements
  --write TEXT  Write entitlements
  --help        Show this message and exit.
kxi package add pipeline

Add a pipeline to the package.

Usage:

kxi package add pipeline [OPTIONS]

Options:

  --name TEXT         The name of the pipeline
  --replicas INTEGER  The number of replica pipelines to create
  --help              Show this message and exit.

kxi package copy

Delete an entity from the package.

Usage:

kxi package copy [OPTIONS] COMMAND [ARGS]...

Options:

  -f, --from <Src-Package>   The package from which you will copy an entity.
  -t, --to <Target-Package>  The package to which you will copy an entity,
                             defaults to `from`
  --help                     Show this message and exit.
kxi package copy pipeline

Copy a pipeline from the package. N.B this operation will clobber existing pipelines.

Usage:

kxi package copy pipeline [OPTIONS]

Options:

  --src-name TEXT     The name of the pipeline to copy
  --dest-name TEXT    The name of the newly copied pipeline
  --replicas INTEGER  The number of replica pipelines to create
  --help              Show this message and exit.

kxi package init

Creates a bare package at the specified target path.

Note: this will not be saved to your KX_PACKAGE_PATH unless install is explicitly run

Usage:

kxi package init [OPTIONS] [PATH_TO_PACKAGE]

Options:

  --force  Will overwrite if the dir is not empty
  --help   Show this message and exit.

kxi package install

Install a package given a requirement or path.

Usage:

kxi package install [OPTIONS] [REQUIREMENT_SPECIFIER]

Options:

  --add-symlink-to PATH  Create a symlink of package_name/version at the
                         specified dir
  --force                Force install: overwrites existing packages and
                         dependencies
  --help                 Show this message and exit.

kxi package list

List all installed packages or artifacts.

Usage:

kxi package list [OPTIONS]

Options:

  --artifacts        If passed, list available artifacts on the system
  --package-json     If passed, lists full manifests for each package
  --fields TEXT      List only the specified fields
  -f, --filter TEXT  Key value pair to filter on. In particular name and
                     version
  --simple           Simplify output to name/ver format
  --help             Show this message and exit.

kxi package lock

Lock the q files within source directory.

Params: source: string|Path - Path to the package who's q files we want to lock. keep_unlocked: bool - Whether to keep the original unlocked q files once the locked versions have been created.

Returns: int - 0 if the run is successful. - 1 if run gets ImportError

Usage:

kxi package lock [OPTIONS] SOURCE

Options:

  --keep-unlocked  Whether to remove the original unlocked q files once the
                   locked versions have been created.
  --help           Show this message and exit.

kxi package packit

Create a package artifact given source code directory.

Usage:

kxi package packit [OPTIONS] SOURCE

Options:

  --keep-unlocked      Whether to keep the original unlocked q files once the
                       locked versions have been created.
  --lock-q-files       Whether to lock the contents of the q files in the
                       package not.
  --all-deps           Packages all deps together
  --tag                Tag for release, omit the random dev hash suffix
  --version TEXT       Override the version of the package
  --package-name TEXT  Override the auto-generated package name
  --help               Show this message and exit.

kxi package pull

Download an artifact from a running service to your local dir.

NAMEVER should be specified like 'name/ver'

Usage:

kxi package pull [OPTIONS] NAMEVER

Options:

  --help  Show this message and exit.

kxi package push

Publish a package artifact to a running service.

NAMEVER should be specified like 'name/ver'

Usage:

kxi package push [OPTIONS] NAMEVER

Options:

  --force  Will overwrite existing packages & their dependencies
  --help   Show this message and exit.

kxi package remote-list

List all installed packages or artifacts on the remote system.

Usage:

kxi package remote-list [OPTIONS]

Options:

  --fields TEXT      List only the specified fields
  -f, --filter TEXT  Key value pair to filter on. In particular name and
                     version
  --artifacts        If passed, list avilable artifacts on the system
  --simple           If passed, list avilable artifacts on the system
  --help             Show this message and exit.

kxi package remote-remove

Remove packages/artifacts from remote service specified as 'name/ver' and can be space delimited.

Usage:

kxi package remote-remove [OPTIONS] [PACKAGES]...

Options:

  --artifacts  Remove available artifacts rather than installed packages
  --force      Suppress user confirmation of removal
  --help       Show this message and exit.

kxi package rm

Delete an entity from the package.

Usage:

kxi package rm [OPTIONS] COMMAND [ARGS]...

Options:

  -f, --from <Package>  The package from which you will delete an entity.
  --help                Show this message and exit.
kxi package rm entitlements

Remove entitlements to the package.

Usage:

kxi package rm entitlements [OPTIONS]

Options:

  --read TEXT   Read entitlements
  --write TEXT  Write entitlements
  --help        Show this message and exit.
kxi package rm pipeline

Delete a pipeline from the package.

Usage:

kxi package rm pipeline [OPTIONS]

Options:

  --name TEXT  The name of the pipeline
  --help       Show this message and exit.

kxi package uninstall

Locally remove packages/artifacts.

packages can be specified as 'name/ver' and can be space delimited

Usage:

kxi package uninstall [OPTIONS] [PACKAGES]...

Options:

  --artifacts  Remove available artifacts rather than installed packages
  --force      Suppress user confirmation of removal
  --help       Show this message and exit.

kxi package unpack

Unpack an artifact to a specified location.

Params: artifact_path: Path|string - path to the artifact that is to be unpacked. unpack_dir: Path|string - path to the directory where the artifact will be unpacked to. If not specified, users PWD will be used. unpacked there.

Returns: None

Usage:

kxi package unpack [OPTIONS] ARTIFACT_PATH

Options:

  --unpack-dir PATH  Path to the directory where the artifact will be unpacked
                     to
  --help             Show this message and exit.