Configuration
kxi
is configured using a configuration file ~/.insights/cli-config
Many commands require options that don't change often, such as the host that you're interacting with.
If you run kxi configure
you will automatically be prompted for the necessary configuration and the configuration file will be created.
The configuration file allows these to be defaulted so you don't need to pass them every-time.
The currently supported settings are
Setting | Description |
---|---|
hostname | Hostname for the KX Insights Platform installation to interact with |
namespace | Namespace for the KX Insights Platform installation to interact with |
client.id | Name of the default client |
client.secret | Default client secret used to request access tokens |
These can be overridden by explicitly passing the value if desired.
An example configuration file
~/.insights/cli-config
[default]
hostname = https://my-host.kx.com
client.id = my-publisher
client.secret = my-secret
kxi
also supports a global --profile
option if you are frequently running commands against various different installs or for different clients.
A different profile can be added by calling kxi configure --profile <name of new profile>
, then any command can use this profile when given the --profile
flag.