Skip to content

Connect CLI usage

It is assumed that you will already have access to the Krucial CONNECT application server to create appropriate credentials for the connect CLI.

Configuration

It is necessary to configure the CLI with appropriate credentials. Your client-id and client-secret values are available via the Krucial Connect application.

Use the command below to set your configuration values:

connect-cli conf --clientId <client-id> --clientSecret <client-secret>

To verify they have been set correctly. Use the show flag:

connect-cli conf --show

To obtain further help for the conf command use the --help flag:

connect-cli conf --help

Authenticate your session

To be able to use the CLI, you must first generate a valid JWT token. This is done using the validate-krucial-client command:

connect-cli validate-krucial-client
Authentication tokens are valid for one hour. You must re-validate every hour to maintain a connection. When your token expires you will receive the response 500 Internal Server Error on the command line.

Running Commands

For full list of commands type:

connect-cli

The structure of the project is split into "topics". The topics used in the project are defined as following:

  1. api-integration
  2. connect-plugin
  3. deployment
  4. device
  5. device-profile
  6. k-cell
  7. plugins
  8. webhook

These topics are based on the Sigma API endpoint structure and are designed to operate in the same manner. Various commands are run with these topics. To obtain a list of all commands for a particular topic, run the following:

connect-cli <topic-name> --help
Some of these flags are optional however some are also required.Running the following command will give a detailed explanation of any command along with all flags used, what these flags mean and some example commands that can be used to get a successful result.

connect-cli <topic-name> <command-name> --help

Known Issues

500 Internal Server Error

Most commonly occurs when your authentication token has expired. Ensure that you have run the configuration step above and then run the following command:

connect-cli validate-krucial-client