Command Line Interface
The Command Line Interface (CLI) for interacting with Packages is fully integrated with the
kdb Insights CLI as outlined here. The
package command within the
kdb Insights CLI allows you to create, package and manage packages locally and within a kdb Insights Enterprise installation. Installation of the
kdb Insights CLI can be achieved following the instructions outlined here.
The following is the list of available commands:
$ kxi package --help Usage: kxi package [OPTIONS] COMMAND [ARGS]... KX Package Import/Export CLI. Options: --version Version information. --artifact-store DIRECTORY Directory in which to store packed artifacts;[default] $KX_ARTIFACT_PATH. --pkg-lib DIRECTORY Directory in which packages will be installed;[default] $KX_PACKAGE_PATH. --deployment-store DIRECTORY Directory in which deployment data is stored;[default] $KX_DEPLOYMENT_PATH. --debug Enable stacktrace print statements for easier debugging. --help Show this message and exit. Commands: When pulling/pushing to a kdb Insights package repository, use these commands: pull Download an artifact from the running insights package manager service to... push Publish an artifact to the running insights package manager service. remote-list List all installed packages or artifacts on the running insights package... remote-remove Remove packages or artifacts from the running insights package manager... For local development, use these commands: init Creates a bare package at the specified target path. install Install a package given a requirement or path. list List all installed packages or artifacts. lock Lock the q files within a source directory. packit Create a package artifact given a source code directory. uninstall Uninstall specified locally installed packages and artifacts. unpack Unpack an artifact to a specified location. validate Validate the contents of a source directory to ensure it is a valid package. For managing deployments & runtime of packages on kdb Insights, use these commands: deploy Deploy a package to an insights instance teardown Teardown a deployed packaged running on an insights instance For managing components added to package, use these commands: add Add an entity to the specified package. copy Copy an entity from the specified package. refresh Refresh an entity of the specified package. rm Remove an entity from the specified package.
Interactions with packages can be local or remote. Packages and their associated artifacts are stored in a location (either locally or on an kdb Insights Enterprise installation) specified by user-defined paths,
KX_ARTIFACT_PATH respectively. This section does not cover interactions with an Insights installation. For details, follow the guide here.