CLI Commands

This section documents all available commands in the Kelvin SDK CLI.

The Kelvin SDK provides a command-line interface accessible via the kelvin command (or ksdk alias).

kelvin

Kelvin SDK

The complete tool to interact with the Kelvin Ecosystem.

Usage

kelvin [OPTIONS] COMMAND [ARGS]...

Options

--version

9.6.0

--docs

Open the kelvin-sdk documentation webpage.

--tree

Display all available commands in a tree structure.

app

Create, build and manage applications.

Usage

kelvin app [OPTIONS] COMMAND [ARGS]...

agent

Manage AI agent configuration files for applications.

Usage

kelvin app agent [OPTIONS] COMMAND [ARGS]...
sync

Sync the AGENTS.md file to the application directory.

Copies the latest AGENTS.md template from the SDK into the specified application directory, overwriting any existing AGENTS.md file.

e.g. kelvin app agent sync –app-dir=”.”

Usage

kelvin app agent sync [OPTIONS]

Options

--app-dir <app_dir>

The path to the application’s directory. Assumes the current directory if not specified.

build

Build a local application into a packaged image.

Usage

kelvin app build [OPTIONS]

Options

--app-dir <app_dir>

The path to the application’s directory. Assumes the current directory if not specified.

--build-arg <build_arg>

docker build-args

--multiarch <multiarch>

Comma-separated list of architectures to build. Supported: amd64,arm64,arm32. Any other value will be passed to docker build engine as is.

Default:

'amd64'

--skip-schema-validation

Skip schema validation during build process.

Default:

False

create

Create a new application based on the specified parameters.

Usage

kelvin app create [OPTIONS] [APP_NAME]

Options

--description <description>

A simple description for the new app.

--app-type <app_type>

Specify the application type.

Default: “app”

Options:

app | importer | exporter | docker

--app-dir <app_dir>

The path to the application’s directory. Assumes the current directory if not specified.

Arguments

APP_NAME

Optional argument

images

Management and display of local images on the Local Application Registry.

Usage

kelvin app images [OPTIONS] COMMAND [ARGS]...
list

List all locally built applications.

Usage

kelvin app images list [OPTIONS]
remove

Remove an application from the local applications list.

e.g. kelvin app images remove “test-app:1.0.0”

Usage

kelvin app images remove [OPTIONS] APP_NAME_WITH_VERSION

Arguments

APP_NAME_WITH_VERSION

Required argument

unpack

Extract the content of an application from its built image into the specified directory.

e.g. kelvin app images unpack “test-app:1.0.0” –output-dir=my_output_dir

Usage

kelvin app images unpack [OPTIONS] APP_NAME_WITH_VERSION

Options

--container-dir <container_dir>

The directory to extract from the container.

--output-dir <output_dir>

Required The directory into which the extracted content will be placed.

Arguments

APP_NAME_WITH_VERSION

Required argument

mlflow

MLFlow integration commands.

Usage

kelvin app mlflow [OPTIONS] COMMAND [ARGS]...
create

Create app based on MLFlow model.

Usage

kelvin app mlflow create [OPTIONS]

Options

--registry-uri <registry_uri>

Required MLFlow registry URI.

--model-name <model_name>

Model name

--model-version <model_version>

Model version

--app-name <app_name>

App name, defaults to the model name.

--app-dir <app_dir>

The path to the application’s directory. Assumes the current directory if not specified.

--prompt, --no-prompt

Prompt for missing information if needed.

import

Import a MLFlow model into an existing Kelvin App.

Usage

kelvin app mlflow import [OPTIONS]

Options

--registry-uri <registry_uri>

Required MLFlow registry URI.

--model-name <model_name>

Model name

--model-version <model_version>

Model version

--app-dir <app_dir>

The path to the application’s directory. Assumes the current directory if not specified.

--prompt, --no-prompt

Prompt for missing information if needed.

--update-config, --no-update-config

Update App configuration with model info

list

Search MLFlow models. Limited to 1000 results. Default filter is model name

Usage

kelvin app mlflow list [OPTIONS]

Options

--registry-uri <registry_uri>

Required MLFlow registry URI.

samples

Opens Kelvin’s code samples GitHub repo.

Usage

kelvin app samples [OPTIONS]

test

Test local applications.

Usage

kelvin app test [OPTIONS] COMMAND [ARGS]...
csv

Publishes data from a csv to the application. The publishing rate is determined by the difference between timestamps in the csv rows.

Usage

kelvin app test csv [OPTIONS]

Options

--config <config>

Required Path to the app config file

Default:

'app.yaml'

--csv <csv>

Required Path to the csv file to publish

--publish-interval <publish_interval>

Publish interval. Set either to “csv” to use the interval between csv rows or to a number to set a fixed publishing interval in seconds.

Default:

'csv'

--ignore-timestamps

Ignore CSV timestamps.

Default:

False

--now-offset

Offsets the (first) CSV timestamp to current time (now).

Default:

False

--replay

Replay mode: Continuously publish data from CSV, restarting from the beginning at end of file

Default:

False

--asset-count <asset_count>

Overrides CSV asset column and generates test assets: from ‘test-asset-1’ to ‘test-asset-N’.

--assets <assets>

Assets Info (Properties) CSV file.

--asset-parameter <asset_parameter>

Override asset parameters eg –asset-parameters kelvin_closed_loop=true (Can be set multiple times)

generator

Publishes data generated by a custom generator class

Usage

kelvin app test generator [OPTIONS]

Options

--config <config>

Required Path to the app config file

Default:

'app.yaml'

--entrypoint <entrypoint>

Required Path to the entrypoint (setuptools style) of the generator python class. It can be path a .py file or path to a module. Eg: mygenerator.py:MyGenerator

--asset-count <asset_count>

Number of test assets from ‘test-asset-1’ to ‘test-asset-N’

simulator

Generates random data to application’s inputs

Usage

kelvin app test simulator [OPTIONS]

Options

--config <config>

Required Path to the app config file

Default:

'app.yaml'

--period <period>

Publish period in seconds

Default:

5

--min <min>

Minimum value to publish

Default:

0

--max <max>

Maximum value to publish

Default:

100

--random, --counter

Publish random values or incremental

Default:

True

--asset-count <asset_count>

Number of test assets from ‘test-asset-1’ to ‘test-asset-N’

--asset-parameter <asset_parameter>

Override asset parameters eg –asset-parameters kelvin_closed_loop=true (Can be set multiple times)

upload

Upload an application to the platform’s Application Registry.

e.g. kelvin app upload –app-dir=”.”

Usage

kelvin app upload [OPTIONS]

Options

--app-dir <app_dir>

The path to the application’s directory. Assumes the current directory if not specified.

--build-arg <build_arg>

docker build-args

--multiarch <multiarch>

Comma-separated list of architectures to build. Supported: amd64,arm64,arm32. Any other value will be passed to docker build engine as is.

Default:

'amd64'

--skip-schema-validation

Skip schema validation during build process.

Default:

False

appregistry

(Deprecated) Manage platform Applications.

Usage

kelvin appregistry [OPTIONS] COMMAND [ARGS]...

delete

(Deprecated) Delete an application from the platform’s Application Registry.

e.g. kelvin appregistry delete “example-app:1.0.0”

Usage

kelvin appregistry delete [OPTIONS] APP_NAME_WITH_VERSION

Options

-y, --yes

If specified, will ignore the destructive warning of the operation and proceed.

Default:

False

Arguments

APP_NAME_WITH_VERSION

Required argument

download

(Deprecated) Download an application from the platform and make it available locally.

e.g. kelvin appregistry download “example-app:1.0.0”

Usage

kelvin appregistry download [OPTIONS] APP_NAME_WITH_VERSION

Options

--local-tag

Specifies whether or not the local name should be tagged (no registry).

Default:

False

Arguments

APP_NAME_WITH_VERSION

Required argument

list

(Deprecated) List all the available applications on the platform’s Application registry.

Usage

kelvin appregistry list [OPTIONS]

show

(Deprecated) Show the platform details and configurations for a specific application.

e.g. kelvin appregistry show “example-app”

e.g. kelvin appregistry show “example-app:1.0.0”

Usage

kelvin appregistry show [OPTIONS] [NAME]

Arguments

NAME

Optional argument

upload

(Deprecated) Upload an application to the platform’s Application Registry.

e.g. kelvin appregistry upload –app-dir=”.”

Usage

kelvin appregistry upload [OPTIONS]

Options

--app-dir <app_dir>

The path to the application’s directory. Assumes the current directory if not specified.

--build-arg <build_arg>

docker build-args

--multiarch <multiarch>

Comma-separated list of architectures to build. Supported: amd64,arm64,arm32. Any other value will be passed to docker build engine as is.

Default:

'amd64'

apps

Manage platform Applications.

Usage

kelvin apps [OPTIONS] COMMAND [ARGS]...

delete

Delete an application from the platform’s Application Registry.

e.g. kelvin apps delete “example-app:1.0.0”

Usage

kelvin apps delete [OPTIONS] APP_NAME_WITH_VERSION

Options

-y, --yes

If specified, will ignore the destructive warning of the operation and proceed.

Default:

False

Arguments

APP_NAME_WITH_VERSION

Required argument

download

Download an application from the platform and make it available locally.

e.g. kelvin apps download “example-app:1.0.0”

Usage

kelvin apps download [OPTIONS] APP_NAME_WITH_VERSION

Options

--tag-local-name, --no-tag-local-name

Specifies whether or not the local name should be tagged (no registry).

Default:

True

Arguments

APP_NAME_WITH_VERSION

Required argument

list

List all the available applications on the platform’s Application registry.

Usage

kelvin apps list [OPTIONS]

show

Show the platform details and configurations for a specific application.

e.g. kelvin apps show “example-app”

e.g. kelvin apps show “example-app:1.0.0”

Usage

kelvin apps show [OPTIONS] [NAME]

Arguments

NAME

Optional argument

upload

Upload an application to the platform’s Application Registry.

e.g. kelvin apps upload –app-dir=”.”

Usage

kelvin apps upload [OPTIONS]

Options

--app-dir <app_dir>

The path to the application’s directory. Assumes the current directory if not specified.

--build-arg <build_arg>

docker build-args

--multiarch <multiarch>

Comma-separated list of architectures to build. Supported: amd64,arm64,arm32. Any other value will be passed to docker build engine as is.

Default:

'amd64'

--skip-schema-validation

Skip schema validation during build process.

Default:

False

auth

Platform authentication.

Usage

kelvin auth [OPTIONS] COMMAND [ARGS]...

login

Login on the platform.

Usage

kelvin auth login [OPTIONS] [URL]

Options

--username <username>

The username used to login on the platform.

--password <password>

The password corresponding to the provided user.

--totp <totp>

The time-based one-time password (TOTP) corresponding to the provided user.

--browser

If specified ksdk opens a browser window to proceed with the authentication.

Default:

False

--client-id <client_id>

The client ID to be used for authentication.

--client-secret <client_secret>

The client secret to be used for authentication.

--reset

If specified will reset all local configuration files required by this tool.

Default:

False

Arguments

URL

Optional argument

logout

Logout from the platform.

Usage

kelvin auth logout [OPTIONS]

Options

-y, --yes

If specified, will ignore the destructive warning of the operation and proceed.

Default:

False

reset

Reset all authentication and configuration cache.

Usage

kelvin auth reset [OPTIONS]

token

Obtain an authentication token for the platform.

Usage

kelvin auth token [OPTIONS]

Options

-f, --full

Return the full authentication token, not just the access authentication token field.

Default:

False

-m, --margin <margin>

Minimum time to expiry (in seconds) for authentication token (new authentication_token retrieved if previous authentication token expires within margin). | Set to 0 to retrieve a new authentication_token.

Default:

10.0

configuration

Local configurations that enhance the usage of this tool.

Usage

kelvin configuration [OPTIONS] COMMAND [ARGS]...

autocomplete

Generate command-completion configuration for KSDK commands.

To configure your shell to complete KSDK commands:

Bash:

$ kelvin configuration autocomplete –shell bash > ~/.bashrc.ksdk $ echo “source ~/.bashrc.ksdk” >> ~/.bashrc

ZSH:

$ kelvin configuration autocomplete –shell zsh > ~/.zshrc.ksdk $ echo “source ~/.zshrc.ksdk” >> ~/.zshrc

Usage

kelvin configuration autocomplete [OPTIONS]

Options

--shell <shell>

Required Name of the shell to generate completion configuration, e.g. bash, zsh, fish

Options:

bash | zsh | fish

list

List all the available configurations for this tool.

Usage

kelvin configuration list [OPTIONS]

set

Set a local configuration for this tool.

e.g. kelvin configuration set KSDK_VERBOSE_MODE True

Configurations can also be set with environment variables:

e.g (Unix) export KSDK_VERBOSE_MODE=1

Usage

kelvin configuration set [OPTIONS] CONFIGURATION VALUE

Arguments

CONFIGURATION

Required argument

VALUE

Required argument

unset

Unset a local configuration for this tool.

e.g. kelvin configuration unset KSDK_VERBOSE_MODE

If the configuration is set as an environment variable, it can also be unset with:

e.g (Unix) unset KSDK_VERBOSE_MODE

Usage

kelvin configuration unset [OPTIONS] CONFIGURATION

Arguments

CONFIGURATION

Required argument

info

Provide system information and the currently logged platform.

Usage

kelvin info [OPTIONS]

Options

--log-type <log_type>

The path fo the app configuration file to be reported.

Default:

'KSDK'

Options:

KSDK | JSON

reset

Reset all configurations & cache used by Kelvin SDK.

Usage

kelvin reset [OPTIONS]

Options

-y, --yes

If specified, will ignore the destructive warning of the operation and proceed.

Default:

False

secret

Manage platform ‘secrets’.

Usage

kelvin secret [OPTIONS] COMMAND [ARGS]...

create

Create a secret on the platform.

Usage

kelvin secret create [OPTIONS] [SECRET_NAME]

Options

--value <value>

The value corresponding to the secret.

Arguments

SECRET_NAME

Optional argument

delete

Delete secrets on the platform.

Usage

kelvin secret delete [OPTIONS] SECRET_NAMES...

Options

-y, --yes

If specified, will ignore the destructive warning of the operation and proceed.

Default:

False

Arguments

SECRET_NAMES

Required argument(s)

list

List all the available secrets on the platform.

Usage

kelvin secret list [OPTIONS]

Options

--filter <query>

The query to filter the secrets by.

update

Update an existing secret on the platform.

Usage

kelvin secret update [OPTIONS] SECRET_NAME

Options

--value <value>

Required The new value for the secret.

Arguments

SECRET_NAME

Required argument

workload

Manage and view application workloads.

Usage

kelvin workload [OPTIONS] COMMAND [ARGS]...

deploy

Deploy a workload with specified parameters.

e.g. kelvin workload deploy –cluster-name work-cluster –workload-name work-name –runtime runtime.yaml –app-config app.yaml

Usage

kelvin workload deploy [OPTIONS]

Options

--cluster-name <cluster_name>

The node to associate to the new workload.

--workload-name <workload_name>

The name of the workload.

--workload-title <workload_title>

The title of the workload.

--app-config <app_config>

App configuration file (app.yaml).

--runtime <runtime>

Workload runtime configuration.

list

List the workloads available on the platform.

Usage

kelvin workload list [OPTIONS]

Options

--cluster-name <cluster_name>

The node name used to filter the workloads.

--app-name <app_name>

The app name, with version, used to filter the workloads.

--source <source>

The source of data to read from. Retrieve from ‘cache’ or force a ‘live’ update.

Default: ‘cache’.

Options:

cache | live

logs

Display the logs of a specific workload.

Usage

kelvin workload logs [OPTIONS] [WORKLOAD_NAME]

Options

--tail-lines <tail_lines>

The number of lines to display.

Default:

200

--output-file <output_file>

The output file to write the logs into.

--follow

If specified, follows the logs.

Default:

False

Arguments

WORKLOAD_NAME

Optional argument

show

Show the details of a specific workload.

Usage

kelvin workload show [OPTIONS] [WORKLOAD_NAME]

Options

--source <source>

The source of data to read from. Retrieve from ‘cache’ or force a ‘live’ update.

Default: ‘cache’.

Options:

cache | live

Arguments

WORKLOAD_NAME

Optional argument

start

Start a workload on a node.

Usage

kelvin workload start [OPTIONS] [WORKLOAD_NAME]

Arguments

WORKLOAD_NAME

Optional argument

stop

Stop a running workload.

Usage

kelvin workload stop [OPTIONS] [WORKLOAD_NAME]

Options

-y, --yes

If specified, will ignore the destructive warning of the operation and proceed.

Default:

False

Arguments

WORKLOAD_NAME

Optional argument

undeploy

Undeploy and delete a workload.

Usage

kelvin workload undeploy [OPTIONS] [WORKLOAD_NAME]

Options

-y, --yes

If specified, will ignore the destructive warning of the operation and proceed.

Default:

False

Arguments

WORKLOAD_NAME

Optional argument

update

Update a specific workload based with new configurations.

e.g. kelvin workload update “my-workload” –app-config app.yaml

Usage

kelvin workload update [OPTIONS]

Options

--workload-name <workload_name>

The name of the workload.

--workload-title <workload_title>

The new title of the workload.

--app-config <app_config>

Required The new configuration to be set on the existing workload.

--runtime <runtime>

Workload runtime configuration.