Skip to content

CLI Overview

The kairos CLI is the primary interface for Substrate evaluation, trace management, scenario operations, and license management. Substrate is the on-premise KAIROS deployment.

The release packages the CLI for Debian Linux on x86-64. Install it from your release package or follow the installation guide.

kairos <command> [subcommand] [options]
Terminal window
kairos --help
CommandDescription
evaluateSingle-shot Substrate evaluation
observeLive telemetry TUI dashboard (in the release package)
traceTrace operations: export, diff, inspect, baseline, bundle, and more
scenarioScenario operations: lint, manifest management
eventsEvent script operations: lint, inspect, diff
backtestScore a trace against expected outcomes
policyValidate or inspect a deployment policy
hitlHuman-in-the-loop coordinator and operator operations
cyberCybersecurity replay operations (in the release package)
roboticsRobotics validation and evidence operations (not in the release package)
fingerprintPrint machine fingerprint for license registration
activateInstall and validate a license file
licenseLicense operations: status

Many commands accept --format with two options:

FormatDescription
jsonPretty-printed JSON (default)
tablePretty-printed JSON

trace export is an exception: --format json prints compact JSON unless --pretty is set. --format table prints pretty-printed JSON.

CodeMeaning
0Command completed successfully
1Runtime, input, or validation error
2Recorded differences in comparison commands, or command-line usage error

A successful evaluate command can return a rejection verdict with exit code 0. Inspect the response to determine the verdict.

Errors normally go to stderr. license status --json reports an invalid license as JSON on stdout and exits 1.

evaluate reads the request from stdin when --request is omitted. trace diff requires two file paths and does not read stdin.

With request.json, artifact.json, policy.json, and a valid installed license, evaluate a request with:

Terminal window
cat request.json | kairos evaluate --config artifact.json --policy policy.json

Print the machine fingerprint for license registration.

Terminal window
kairos fingerprint

The command prints Machine fingerprint: <fingerprint>, a blank line, then this registration instruction:

Send this value to Ananke Labs to register this machine on your license.

To print JSON with fingerprint, hostname, and platform, run:

Terminal window
kairos fingerprint --json

Install and validate a license file.

Terminal window
kairos activate --license /path/to/license.key

To use a custom install location, run:

Terminal window
kairos activate --license /path/to/license.key --target /opt/kairos/license.key
FlagRequiredDescription
--licenseYesPath to the .key file from Ananke Labs
--targetNoInstall location (default: ~/.kairos/license.key)

Replace /path/to/license.key with the supplied license path. The command validates the license before copying it. It prints License valid, then Customer, License, Mode, Domains, Expires, and Installed, in that order.

Show the current license status.

Terminal window
kairos license status

To print JSON, run:

Terminal window
kairos license status --json

To select another license file, run:

Terminal window
kairos license status --license /opt/kairos/license.key
FlagRequiredDescription
--licenseNoOverride license file path
--jsonNoOutput as JSON

For a valid license, text output starts with License status: VALID. The fields follow in this order: Mode, Customer, License ID, Tier, Domains, Expires, and Fingerprint. Evaluation licenses with 14 days or fewer remaining also print an expiry warning and a support contact line. JSON output includes status, mode, customer, licenseId, tier, domains, expiresAt, daysRemaining, fingerprint, and fingerprintMatch. For an invalid license, JSON output contains status: "INVALID" and error. Text output starts with License status: INVALID, followed by the error.

Lint a scenario manifest for errors.

Terminal window
kairos scenario lint manifest.json

Use a scenario manifest JSON file for manifest.json. The command prints OK: <count> scenarios parsed from <path> to stderr. Duplicate IDs produce WARNING: duplicate scenario ID '<id>'. Invalid JSON prints FAIL: <error> and exits 1.

Scenario manifest operations: show, validate, diff, pack.

Terminal window
kairos scenario manifest show

This prints the embedded manifest as JSON. To print a custom manifest, run:

Terminal window
kairos scenario manifest show --manifest custom.json

To validate a manifest, run:

Terminal window
kairos scenario manifest validate manifest.json

On success, this prints Validation OK: <count> scenarios to stderr.

To compare manifests, run:

Terminal window
kairos scenario manifest diff a.json b.json

This prints JSON with countA, countB, onlyInA, onlyInB, common, and identical. Different manifests exit 2.

To create a JSON archive, run:

Terminal window
kairos scenario manifest pack create manifest.json --output archive.pack.json

This prints Packed <count> scenarios to <path> to stderr.

To validate an archive, run:

Terminal window
kairos scenario manifest pack validate archive.pack.json

On success, this prints Content: <count> scenarios, then Pack validation OK (version: <version>) to stderr. Validation checks the pack version, scenario parsing, and count. It does not verify the stored SHA-256 hash.

To compare archives, run:

Terminal window
kairos scenario manifest pack diff a.pack.json b.pack.json

This compares the stored hashes and prints versionA, versionB, scenariosA, scenariosB, hashMatch, and identical as JSON. Different hashes exit 2. Use existing manifests and archives for the example file names.

CommandOptional flags
manifest show--manifest, --format json or --format table
manifest diff--format json or --format table
manifest pack create--version (default: 0.0.0)