Skip to content
GitLab

CLI Reference

The akili CLI is the primary developer interface for the Akili Data Product Platform. It is a thin wrapper around the control plane API — every command maps to an API call with no local business logic.

Terminal window
# From the platform release
curl -sSL https://releases.akili.dev/cli/latest/install.sh | sh
# From source
cargo install --path platform/control-plane/crates/akili-cli
CommandDescription
akili authAuthentication management — login, logout, status, token
akili productManage data products — create, list, show, deploy, delete
akili tenantManage tenants — create, list, suspend, reactivate, archive
akili runManage executions — trigger, list, get, cancel, view steps
akili registryRegistry and dependency graph — search, impact analysis, contracts
akili dlqDead letter queue — list, inspect, replay, purge
akili governanceGovernance — quality, lineage, SLA, retention, policies, concepts
akili discoveryDiscovery and search — full-text search, NL-to-SQL query, sample
akili connectionConnection management — create, test, discover resources, schema
akili domainDomain management — list, get, view domain products
akili ingestionIngestion management — state, backfill, list
akili validateValidate manifest files against the platform schema
akili scaffoldScaffold a new data product with manifest templates
akili configCLI configuration — init, show, set profile, path
CommandDescription
akili statusCheck platform health (API connectivity and auth status)
akili versionPrint CLI and API version information
akili completion <shell>Generate shell completions (bash, zsh, fish, powershell)
akili graph <args...>Delegate to the akili-graph CLI for graph operations

Every command accepts these flags. They are defined on the root command and inherited by all subcommands.

FlagShortTypeDefaultDescription
--jsonboolfalseOutput as JSON instead of tables
--no-colorboolauto-detectDisable ANSI color codes
--verbose-vboolfalsePrint verbose output including HTTP request/response details
--quiet-qboolfalseSuppress non-essential output
--profilestringConfig profile to use (from config.toml)
--api-urlstringhttp://localhost:8080API base URL override
--timeoutinteger30Request timeout in seconds

Configuration values are resolved in this order (highest priority first):

  1. CLI flag (e.g., --api-url)
  2. Environment variable (e.g., AKILI_API_URL)
  3. Config file (~/.config/akili/config.toml)
  4. Built-in default
VariableMaps to
AKILI_API_URL--api-url
AKILI_TOKENAuthentication token
AKILI_OUTPUTOutput format
AKILI_TIMEOUT--timeout

The CLI reads configuration from ~/.config/akili/config.toml. Initialize it with akili config init.

# Default profile
[default]
api_url = "https://api.akili.systems"
# Named profiles
[profiles.staging]
api_url = "https://staging-api.akili.systems"
[profiles.local]
api_url = "http://localhost:8080"

Switch profiles with the --profile flag:

Terminal window
akili --profile staging product list

Tokens are stored separately with 0600 file permissions. For CI/CD, use the AKILI_TOKEN environment variable instead of a config file.

See akili config for full configuration management.

CodeMeaningWhen
0SuccessCommand completed successfully
1General errorUnspecified failure
2Usage errorInvalid flags, missing arguments
3Authentication errorToken expired, invalid, or missing
4Not foundRequested resource does not exist (HTTP 404)
5Validation errorManifest validation failed (HTTP 422)
6ConflictResource already exists or state conflict (HTTP 409)
7Rate limitedToo many requests (HTTP 429)
8Server errorAPI returned 5xx
9TimeoutRequest exceeded --timeout duration
10Network errorCannot reach API (DNS, connection refused, TLS)

Scripts should check specific exit codes, not just zero vs. non-zero:

Terminal window
akili product validate ./my-product/
case $? in
0) echo "PASS: validation succeeded" ;;
3) echo "FAIL: authentication -- check AKILI_TOKEN" ;;
5) echo "FAIL: validation errors found" ;;
*) echo "FAIL: unexpected error $?" ;;
esac

The CLI supports two output modes:

  • Table format (default in TTY): Human-readable aligned columns with ANSI colors. Long values are truncated. List commands show a summary line.
  • JSON format (--json or piped output): Raw API response body with no wrapping or transformation. Suitable for jq and scripting.

Errors always go to stderr. Data always goes to stdout. This ensures piping works correctly:

Terminal window
akili product list --json | jq '.[] | .name'

Long-running operations (deploy, trigger) display a spinner on stderr with elapsed time when connected to a TTY.