Skip to main content

Configuration

Configure the CLI to connect to your DevOps AI Toolkit server.

Server URL

Specify the server address:

Environment variable:

export DOT_AI_URL="https://your-server-url"

Command-line flag:

dot-ai query "test" --server-url https://your-server-url

Default: http://localhost:3456

Authentication

Set the authentication token:

Environment variable:

export DOT_AI_AUTH_TOKEN="your-token-here"

Command-line flag:

dot-ai query "test" --token your-token-here

Default: No authentication (for local development)

Output Format

Choose the output format:

Environment variable:

export DOT_AI_OUTPUT_FORMAT="json"  # or "yaml"

Command-line flag:

dot-ai query "test" --output json

Default: yaml

Options:

  • yaml — Human-readable, structured output (default)
  • json — Machine-parseable, raw API response

Persistent Configuration Files

The CLI stores settings and credentials in ~/.config/dot-ai/ with restricted permissions (owner-only access).

settings.json — user preferences:

{
"server_url": "https://dot-ai.example.com",
"output_format": "json"
}

credentials.json — authentication state:

{
"auth_token": "your-static-token"
}

OAuth fields (access_token, token_type, expires_at, client_id, client_secret) are managed automatically by dot-ai auth login and dot-ai auth logout. See Authentication for details.

Config Command

Manage persistent settings with the config command instead of editing JSON files:

# Set a value
dot-ai config set server-url https://dot-ai.example.com
dot-ai config set output-format json
dot-ai config set skills.include "query|recommend|remediate"
dot-ai config set skills.exclude "debug-.*"

# Get a value
dot-ai config get server-url

# List all settings (always shows all known keys)
dot-ai config list

# Reset a value to its default
dot-ai config reset server-url

Supported keys:

KeyDescriptionDefault
server-urlServer URL(not set)
output-formatOutput format (json, yaml)yaml
skills.includeRegex for skills to include(not set)
skills.excludeRegex for skills to exclude(not set)
skills.custom_onlyOnly generate custom skills, skip MCP tools (true/false)(not set)

Unknown keys are rejected with an error listing all valid keys.

Configuration Precedence

Settings are applied in this order (highest to lowest priority):

SettingFlagEnv varConfig fileDefault
Server URL--server-urlDOT_AI_URLsettings.json server_urlhttp://localhost:3456
Auth token--tokenDOT_AI_AUTH_TOKENcredentials.json auth_token / access_tokennone
Output format--outputDOT_AI_OUTPUT_FORMATsettings.json output_formatyaml
Skills include--includeDOT_AI_SKILLS_INCLUDEsettings.json skills_includenone
Skills exclude--excludeDOT_AI_SKILLS_EXCLUDEsettings.json skills_excludenone
Skills custom only--custom-onlyDOT_AI_SKILLS_CUSTOM_ONLYsettings.json skills_custom_onlynone

For auth tokens specifically, auth_token (static) takes priority over access_token (OAuth) in the credentials file. Expired OAuth tokens are skipped.

Example Configuration

For local development:

# No configuration needed - defaults work
dot-ai version

For remote server:

# Set once in your shell profile
export DOT_AI_URL="https://dot-ai.example.com"
export DOT_AI_AUTH_TOKEN="your-token"

# Then use normally
dot-ai query "what pods are running?"

Using the config command:

# Set persistent values
dot-ai config set server-url https://dot-ai.example.com
dot-ai config set output-format json

# Then use normally
dot-ai query "what pods are running?"

For multiple environments:

# Development
DOT_AI_URL="https://dev.example.com" dot-ai query "test"

# Production
DOT_AI_URL="https://prod.example.com" DOT_AI_AUTH_TOKEN="prod-token" dot-ai query "test"

Next Steps