.env file in the project root or in your HOME directory.
Priority Order
1
Command-line flags
E.g.:
--provider, --model (highest priority)2
System Environment Variables
export LLM_PROVIDER=OPENAI3
Variables in the .env file
LLM_PROVIDER=OPENAI4
Default Values
ChatCLI internal defaults (lowest priority)
General Configuration
Color Theme
CHATCLI_THEME selects the color palette that re-skins the entire interface — chat, /coder and /agent cards, borders, markdown, code blocks, and spinners. Unlike CHATCLI_CODER_UI, the theme is process-global state, so a switch applies on the next render, with no restart.
There are 11 themes: dark and light (ChatCLI’s calibrated variants) + nine community palettes — dracula, nord, tokyo-night, solarized-dark, solarized-light, gruvbox, catppuccin-mocha, monokai, one-dark. Real-color previews of each are in the Theme System.
CHATCLI_THEME=light to your .env — the mutator prints this hint after every switch and never rewrites your .env on its own. In pipes, CI, or colorless terminals (NO_COLOR, dumb), output degrades to clean plain text. Full details in the Theme System.
UI Styles
CHATCLI_CODER_UI controls how /coder and /agent modes render tool calls, reasoning and results in the timeline. Before v1.119 it only affected /coder; from that version onward it applies to /agent too — anyone with CHATCLI_CODER_UI=compact already set will see /agent go compact as well.
Switch the UI at runtime
Since v1.119 you can swap the style without restarting ChatCLI, right from the prompt:CHATCLI_CODER_UI=compact (or any other value) to your .env — the mutator prints that hint right after every switch.
Parallel visual changes (v1.119)
- Card footers now end at the content width (
╰────╯) instead of stretching to the terminal edge. - Errors in true red (
✗,❌ EXECUTION FAILED) instead of purple. If your terminal maps ANSI 31 to a non-red color via theme, adjust the palette. - Unified banner for
/coderand/agent: same entry card with Objective/Task, Workspace and Policy. /agentmenu reorganized into 3 columns (Execution · Edit & Context · View) — was a 12-line vertical list before.- Prompt prefix groups all badges (
[🌐 ⏵ ▶2⏳1 🅿1]) instead of listing[remote] [watch] [jobs:…] [🅿️ resume:…]separately. - Chat turn header: new envelope
╭─ model ─── 1.4s · 312↑ 1800↓ ─╮ … ╰─╯in chat mode, with latency and estimated tokens.
Context and Output Compression
Runtime control of Context Compression (CCR) and output-token reduction. Changes take effect immediately; set the variables in.env for a permanent default.
@compress/@recall tools expose on-demand compression to the model. See the Context Compression page for details, environment variables and never-degrade guarantees.
OAuth Authentication
In addition to traditional API keys, ChatCLI supports OAuth authentication for OpenAI, Anthropic, and GitHub Copilot. With OAuth, you can use your existing plan (ChatGPT Plus, Codex, Claude Pro, GitHub Copilot) without generating API keys.
Credentials are stored with AES-256-GCM encryption in
~/.chatcli/auth-profiles.json. The encryption key is automatically generated and saved in ~/.chatcli/.auth-key (permission 0600).
Use/auth login openai-codex,/auth login anthropic, or/auth login github-copilotin interactive mode to start the OAuth flow. See the full OAuth documentation for more details.
Provider Configuration
OpenAI
Anthropic (Claude)
Google (Gemini)
xAI (Grok)
Ollama (Local)
StackSpot
ZAI (Zhipu AI)
Automatic JWT rotation: Keys in
id.secret format automatically enable JWT token generation (HMAC-SHA256) with custom header {"alg": "HS256", "sign_type": "SIGN"}. Tokens are cached for 30 minutes and regenerated with a 5-minute safety margin. Keys without ”.” continue to work as traditional Bearer tokens. Fully automatic, no additional configuration needed.MiniMax
Anthropic-compatible endpoint: Set
MINIMAX_API_COMPAT=anthropic to use https://api.minimax.io/anthropic/v1/messages with Anthropic Messages format (system as top-level field, content blocks). The anthropic-version: 2023-06-01 header is added automatically. Same Bearer token auth is used. Native tool calling is disabled in this mode (falls back to XML). Also available via Helm (secrets.minimaxApiCompat: "anthropic") or Docker (MINIMAX_API_COMPAT=anthropic).Moonshot (Kimi)
Thinking vs Instant mode: Default
auto lets the model choose; enabled forces explicit reasoning (higher latency, more tokens); disabled forces direct response. Useful for switching between tasks that benefit from chain-of-thought and fast responses (extraction, classification). The flag is injected via extra_body.thinking.type in the OpenAI-compatible payload.OpenRouter
OpenRouter is a multi-provider API gateway that provides access to 200+ models from all major providers through a single API key. Models use the
provider/model-name format (e.g., openai/gpt-4o, anthropic/claude-sonnet-4). The default model is openai/gpt-4o.GitHub Copilot
AWS Bedrock
Bedrock does not use an API key — authentication uses the AWS SDK credential chain: env vars →
~/.aws/credentials → ~/.aws/config (SSO, assume-role) → IAM role (EC2/ECS/EKS).* At least one credential source is required: AWS_PROFILE, AWS_ACCESS_KEY_ID, SSO profile in ~/.aws/config, credentials in ~/.aws/credentials, or IAM role. For full details (SSO, proxy, inference profiles), see the AWS Bedrock documentation.
* For OpenAI, Anthropic, and GitHub Copilot, the API key is required only if you are not using OAuth authentication (/auth login). Both methods can coexist.
Agent Mode Configuration
Multi-Agent (Parallel Orchestration)
For complete details on the multi-agent system, see the Multi-Agent Orchestration documentation.
Server Mode Configuration (chatcli server)
Provider Fallback
For complete details, see the Provider Fallback documentation.
MCP (Model Context Protocol)
Files under ~/.chatcli/mcp/
Beyond mcp_servers.json, the MCP subsystem manages a dedicated directory for durable state:
For complete details, see the MCP documentation and MCP Channels.
Web Search
Backends are keyless (no third-party API key). DuckDuckGo is the zero-config default; self-hosted SearxNG is preferred in corporate environments. See Web Tools for the fallback chain and how to enable SearxNG’s JSON API.
Bootstrap and Memory
For complete details, see the Bootstrap and Memory documentation.
Skill Registry (Multi-Registry)
The registry system is configured via the
~/.chatcli/registries.yaml file (automatically created with default registries: chatcli and clawhub). The variables above serve as overrides.
For complete details, see the Skill Registry documentation.
Security and Control
Agent Mode Security
Authentication and Tokens
Network and Server Security
Plugin Security
K8s Operator Security
For complete details on security, see the Security and Hardening documentation.