Skip to content

Configuration Schema ​

See the Configuration Guide for complete documentation.

This page provides a technical schema reference.

JSON Schema ​

json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "required": ["version", "profiles"],
  "properties": {
    "version": {
      "type": "string",
      "const": "1.0"
    },
    "profiles": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/profile"
      }
    },
    "defaults": {
      "$ref": "#/definitions/defaults"
    },
    "clients": {
      "$ref": "#/definitions/clients"
    }
  }
}

Field Reference ​

Root Configuration ​

FieldTypeRequiredDescription
versionstringYesConfiguration schema version (must be "1.0")
profilesarrayYesList of database connection profiles
defaultsobjectNoDefault settings for connections and queries
clientsobjectNoClient-specific settings (TUI and Web)

Profile ​

Database connection profile.

FieldTypeRequiredDescriptionValidation
namestringYesUnique profile identifierMust be unique
hostsstring[]YesList of Cassandra/ScyllaDB host addressesAt least one host required
portintegerYesCQL port numberRange: 1-65535
keyspacestringNoDefault keyspace to connect to-
authobjectNoAuthentication credentialsSee AuthConfig
sslobjectNoSSL/TLS configurationSee SSLConfig
aiobjectNoNatural language query settingsSee AIConfig

Example:

json
{
  "name": "production",
  "hosts": ["db1.example.com", "db2.example.com"],
  "port": 9042,
  "keyspace": "myapp",
  "auth": {
    "username": "cassandra",
    "password": "${DB_PASSWORD}"
  }
}

AuthConfig ​

Authentication credentials for the database.

FieldTypeRequiredDescription
usernamestringYesDatabase username
passwordstringYesDatabase password (supports environment variable interpolation)

Example:

json
{
  "username": "admin",
  "password": "${CASSANDRA_PASSWORD}"
}

SSLConfig ​

SSL/TLS connection settings.

FieldTypeRequiredDefaultDescription
enabledbooleanYes-Enable SSL/TLS connection
cert_pathstringNo-Path to client certificate file (supports env interpolation)
key_pathstringNo-Path to client private key file (supports env interpolation)
ca_pathstringNo-Path to CA certificate file (supports env interpolation)
insecure_skip_verifybooleanNofalseSkip certificate verification (insecure, use only for testing)

Example:

json
{
  "enabled": true,
  "cert_path": "${HOME}/.cassandra/client-cert.pem",
  "key_path": "${HOME}/.cassandra/client-key.pem",
  "ca_path": "${HOME}/.cassandra/ca-cert.pem",
  "insecure_skip_verify": false
}

ConnTuningConfig ​

Optional per-profile connection tuning. All fields are optional; unset fields fall back to defaults (consistency QUORUM, timeout 10s, pool size 5).

FieldTypeRequiredDefaultDescriptionValidation
consistencystringNoQUORUMCQL consistency levelOne of: ANY, ONE, TWO, THREE, QUORUM, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE, ALL (case-insensitive)
timeoutstringNo10sQuery timeout as a Go durationPositive duration, max 5m
pool_sizeintegerNo5Connection pool size per hostRange: 1-100

AIConfig ​

Optional per-profile settings for natural language queries. Kassie uses locally installed agent CLIs (opencode, claude, codex, gemini) as translators — no API keys required.

FieldTypeRequiredDefaultDescriptionValidation
providerstringNoautoWhich agent CLI to useOne of: auto, opencode, claude, codex, gemini
modelstringNo-Model passed to the CLI (--model/-m); empty uses the CLI's default-
timeout_secondsintegerNo60Agent CLI timeout in secondsRange: 1-600
privacystringNonames+typesSchema detail sent in promptsOne of: names, names+types

Example:

json
{
  "consistency": "LOCAL_QUORUM",
  "timeout": "30s",
  "pool_size": 10
}

Attach it to a profile via the connection key:

json
{
  "name": "prod",
  "hosts": ["10.0.0.1"],
  "port": 9042,
  "connection": {
    "consistency": "LOCAL_QUORUM",
    "timeout": "30s",
    "pool_size": 10
  }
}

DefaultConfig ​

Default settings for database operations.

FieldTypeRequiredDefaultDescriptionValidation
default_profilestringNoFirst profileProfile to use when none specifiedMust reference existing profile
page_sizeintegerNo100Number of rows per page in query resultsRange: 1-10000
timeout_msintegerNo10000Query timeout in millisecondsRange: 100-300000

Example:

json
{
  "default_profile": "local",
  "page_size": 100,
  "timeout_ms": 10000
}

ClientConfig ​

Client-specific settings for TUI and Web interfaces.

FieldTypeRequiredDescription
tuiobjectNoTerminal UI settings (see TUIConfig)
webobjectNoWeb UI settings (see WebConfig)

TUIConfig ​

Terminal UI configuration.

FieldTypeRequiredDefaultDescription
themestringNo"default"Color theme for TUI
vim_modebooleanNofalseEnable Vim-style keybindings

Example:

json
{
  "theme": "default",
  "vim_mode": false
}

WebConfig ​

Web UI configuration.

FieldTypeRequiredDefaultDescriptionValidation
auto_open_browserbooleanNotrueAutomatically open browser when starting web UI
default_portintegerNo8080Default HTTP port for web UIRange: 1-65535

Example:

json
{
  "auto_open_browser": true,
  "default_port": 8080
}

Environment Variable Interpolation ​

Configuration values support environment variable interpolation using the ${VAR_NAME} syntax.

Supported Fields ​

The following fields support environment variable interpolation:

  • auth.username
  • auth.password
  • ssl.cert_path
  • ssl.key_path
  • ssl.ca_path

Syntax ​

json
{
  "auth": {
    "username": "${DB_USER}",
    "password": "${DB_PASSWORD}"
  },
  "ssl": {
    "cert_path": "${HOME}/.cassandra/cert.pem"
  }
}

Rules ​

  • Pattern: ${VARIABLE_NAME}
  • Variable names must match regex: [A-Z_][A-Z0-9_]*
  • Variables are resolved at runtime when config is loaded
  • Nested interpolation supported (up to 10 levels)
  • Circular references detected and rejected
  • Missing variables cause config load failure

Examples ​

Using credentials from environment:

bash
export CASSANDRA_USER="admin"
export CASSANDRA_PASS="secret123"
json
{
  "profiles": [{
    "name": "production",
    "hosts": ["prod.example.com"],
    "port": 9042,
    "auth": {
      "username": "${CASSANDRA_USER}",
      "password": "${CASSANDRA_PASS}"
    }
  }]
}

Using path expansion:

json
{
  "profiles": [{
    "ssl": {
      "enabled": true,
      "cert_path": "${HOME}/.cassandra/client.crt",
      "key_path": "${HOME}/.cassandra/client.key"
    }
  }]
}

Validation Rules ​

Configuration is validated when loaded. Validation failures prevent startup.

Profile Validation ​

  • Name: Must be non-empty string
  • Hosts: At least one host required
  • Port: Must be in range 1-65535
  • Profile names: Must be unique across all profiles

Defaults Validation ​

  • PageSize: Must be in range 1-10000
  • TimeoutMs: Must be in range 100-300000 (0.1s - 5min)

Clients Validation ​

  • Web.DefaultPort: Must be in range 1-65535

Error Messages ​

Validation ErrorCause
profile not foundReferenced profile does not exist
invalid port numberPort outside valid range (1-65535)
no hosts specifiedProfile has empty hosts array
invalid configurationProfile missing required name field
duplicate profile nameTwo profiles have the same name
no profiles definedConfig has empty profiles array
invalid page sizePageSize outside range 1-10000
invalid timeoutTimeoutMs outside range 100-300000

Complete Example ​

json
{
  "version": "1.0",
  "profiles": [
    {
      "name": "local",
      "hosts": ["127.0.0.1"],
      "port": 9042,
      "keyspace": "system"
    },
    {
      "name": "production",
      "hosts": ["db1.prod.example.com", "db2.prod.example.com"],
      "port": 9042,
      "keyspace": "myapp",
      "auth": {
        "username": "${PROD_DB_USER}",
        "password": "${PROD_DB_PASSWORD}"
      },
      "ssl": {
        "enabled": true,
        "ca_path": "${HOME}/.cassandra/ca.pem",
        "insecure_skip_verify": false
      }
    }
  ],
  "defaults": {
    "default_profile": "local",
    "page_size": 100,
    "timeout_ms": 10000
  },
  "clients": {
    "tui": {
      "theme": "default",
      "vim_mode": false
    },
    "web": {
      "auto_open_browser": true,
      "default_port": 8080
    }
  }
}

See the Configuration Guide for complete documentation.

Released under the MIT License.