.env file or via export in the shell.
General
LLM Providers
OpenAI
Anthropic (Claude)
AWS Bedrock (full catalog)
BEDROCK provider — invokes the entire Bedrock catalog (Anthropic, OpenAI, Llama, Nova, Mistral, Cohere, AI21, DeepSeek, Moonshot Kimi (also available directly via MOONSHOT), MiniMax, Qwen, Z.AI/GLM, Gemma, Nemotron, TwelveLabs, and any provider AWS adds) using the SDK’s credential chain (env vars, ~/.aws/credentials, SSO via ~/.aws/config, IAM role). Activation requires real credentials — the mere existence of ~/.aws/config with only region/output does not activate Bedrock.
Google AI (Gemini)
xAI (Grok)
Ollama (Local Models)
Devin CLI (Cognition)
The DEVIN provider wraps the localdevin binary — auth belongs to the CLI (devin auth login); see Devin Provider.
ZAI (Zhipu AI)
MiniMax
Moonshot (Kimi)
OpenRouter
GitHub Copilot
StackSpot
StackSpot’s agent API decides the output limit server-side (it ignores
max_tokens in the payload). ChatCLI’s catalog assumes a 128K context window for StackSpot agents — previously the generic 50K fallback made auto-compact fire on almost every turn. If your agent’s foundation model has a different window, tune it with CHATCLI_CONTEXT_WINDOW.Agent Mode
Multi-Agent (Parallel Orchestration)
Mixture-of-Agents (MoA)
An ensemble where several models propose an answer in parallel and an aggregator synthesizes the best one. Distinct from the parallel orchestration above (which dispatches specialist agents): here the axis is model/provider diversity. Triggered by the/moa command. Every participant — proposers and aggregator — gets the same briefing as a chat turn (attached contexts, workspace memory, skills) and read-only tools: knowledge, CCR recall and long-term memory recall. See Mixture-of-Agents.
Token Efficiency
Knobs for the token-saving optimizations (structured prompt caching, stagnation detector, smart routing, webfetch auto-save, microcompaction). See Token Efficiency for details.Stagnation early-exit
Tool-failure guard (toolguard)
An advisory guard (it never aborts) that detects the same tool failing repeatedly inside the agent loop and injects a hint for the model to change approach instead of retrying the same error.Smart chat ↔ agent routing
Model routing tool
WebFetch auto-save
Tool result microcompaction
Applied to the session history to shrink old tool results. See also Tool Result Management.Context compression (CCR)
Content-aware, reversible compression of tool output, logs, diffs, JSON and prose. See Context Compression.Output-token reduction
Harness/Quality Pipeline (7 Patterns)
Variables for the harness/quality pipeline that implements the seven LLM-agent patterns. See full overview and detailed configuration.Master switch
Self-Refine (#5)
Semantic convergence cascade (char → Jaccard → embedding)
Chain-of-Verification (#6)
Reflexion (#3)
Durable queue (WAL + worker pool + DLQ)
When enabled, reflexion triggers flow through a persistent queue — lessons survive process crashes via WAL replay on next boot.Plan-and-Solve / ReWOO (#2)
RAG + HyDE (#4)
Embedding Providers (used by HyDE 3b)
Reasoning Backbone (#7)
Per-Agent Overrides (includes refiner / verifier)
Session Workspace and Subagent
Variables that control the Session Workspace (scratch dir + tool-result overflow) and Subagent Delegation.Global TLS Trust (Corporate Proxy)
For environments behind a corporate proxy/gateway performing TLS inspection with a private CA (Zscaler, Netskope, CrowdStrike Falcon, etc.). Both variables apply to every outbound HTTPS connection in the process: all LLM providers, TTS/STT, embeddings, web tools (@webfetch/@websearch/@osv), gateway channels, MCP transports, skill registries and the version check. The process-wide equivalent of NODE_EXTRA_CA_CERTS / NODE_TLS_REJECT_UNAUTHORIZED in Node.js tools such as Claude Code.
Go — and therefore ChatCLI — already trusts the operating system’s cert store by default (Keychain on macOS, the Windows cert store,
/etc/ssl on Linux). If the corporate CA is already installed on the machine, no configuration is needed. CHATCLI_CA_BUNDLE covers the case where the CA cannot be installed system-wide.CHATCLI_BEDROCK_CA_BUNDLE / CHATCLI_BEDROCK_INSECURE_SKIP_VERIFY, in the AWS Bedrock section) take precedence over the global ones; when absent, Bedrock inherits the globals as fallback, since the AWS SDK builds its own HTTP client.
History Compaction and Payload Recovery
Controls theHistoryCompactor (3-level pipeline: trim → summarize → emergency) and the reactive detection of corporate-proxy/gateway limits. See Context Recovery.
When a 413/WAF/EOF hits, Bedrock errors carry the exact rejected request size and the session cap is derived from it (adaptive learned cap). Only when the size is unknown does ChatCLI fall back to assuming 4 MB for the rest of the session. Either way it injects a one-time hint into history telling the AI to prefer line-ranged reads. If the system prompt alone (personas, skills, MCP tool docs) meets the rejected size, recovery fails fast with an actionable diagnosis instead of retrying — see Context Recovery.
/coder and /agent UI
Available styles:
full(default) — full bordered cards╭── ICON TITLE ─────╮ … ╰─╯. Each tool call is a highlighted action. Best for/agent(supervised plan-and-execute).compact— inline lines↻ Read(main.go)/✓ Read(main.go) 0.3s. Long sessions with dozens of tools stay scannable. Best for/coder.minimal— middle ground: smaller cards with truncated content.
CHATCLI_CODER_UI for back-compat, but as of v1.119 it controls BOTH modes. If you had CHATCLI_CODER_UI=compact set, /agent will now also render compactly.Provider Fallback
MCP (Model Context Protocol)
The MCP subsystem also manages
~/.chatcli/mcp/ for durable state: channels.jsonl (durable push-notification ring, with rotation) and triggers.json (opt-in trigger engine rules). These paths are fixed — no environment variables override them. Details: MCP Channels and MCP Config.Bootstrap and Memory
Scheduler
See Scheduler (Chronos) for the full design. All boolean variables acceptenabled/disabled/true/false/1/0.
Core
Default budget (per-job overrides win)
Safety
Audit log
Daemon
Metrics and Observability
Security
Context and memory threat scan
Sanitizes injected prompt content — contexts attached via/context attach and long-term memory — against prompt-injection before sending it to the model.
Server Security
Agent Security
Plugin and Auth Security
Operator Security
The operator REST API authentication loads API keys with hot-reload every 30s in the following priority order: Secretchatcli-operator-secrets → ConfigMap chatcli-operator-config → reject (or accept in dev-mode if CHATCLI_OPERATOR_DEV_MODE=true).
OAuth
Remote Server
Remote Client
Chat Gateway (Telegram / Slack / Discord / WhatsApp / Webhook)
Bridge that exposes ChatCLI as a bot/service on messaging platforms. Started with/gateway start. Each inbound message runs through the real agent loop (tools, shell, file edits — auto-executed) and the progress is streamed back to the chat. Each adapter only activates when its required variables are present — set only the channels you want. See Chat Gateway.
Telegram
Slack
Discord
WhatsApp (Cloud API)
Generic webhook
Voice / transcription (audio on channels)
Transcribes voice notes to text before the pipeline. Local-first selection: command → self-hosted URL → whisper CLI on PATH (auto, downloads the model) → Groq → OpenAI → disabled. See Chat Gateway → Voice messages.Voice notes are OGG/Opus; local whisper.cpp and the embedded engine need ffmpeg to decode them (cloud/self-hosted backends decode server-side). With nothing configured, the gateway uses the embedded Whisper automatically — only platforms without a prebuilt engine get the configuration hint.
Proactive messaging (@send)
Home channels for the@send tool when the target is just the platform.
Voice reply / TTS
Synthesizes the reply to audio. Local-first: command → self-hosted URL → embedded (if provisioned) →say/espeak on PATH → OpenAI → Groq → Gemini → disabled. See Text-to-Speech and Voice Replies.
Image generation (@image)
Generates images from text. Local-first: SD WebUI → OpenAI-compatible URL → OpenAI → Google Imagen → xAI grok-image → Bedrock. See Image Generation.Diagram rendering (@diagram)
Renders Graphviz DOT to PNG/SVG/JPG with crisp, correct text. Graphviz is embedded (WASM, no install); when a systemdot is on PATH, the auto backend uses it for more polished output. See Diagrams (@diagram).
Interactive graph (@graphview)
Renders an interactive, Obsidian-style force-directed graph (draggable) to a self-contained HTML file opened in the browser. See Interactive graph (@graphview).Vision / image input
Lets the model see attached images (@file photo.png) in chat/coder/agent and over the gateway. Hybrid strategy: providers with vision in the catalog get the image natively; without vision, a vision model describes the image and the text is folded into the prompt (describe-fallback). See Image Input (Vision).
xAI (image) and Groq (voice) use their standard keys (
XAI_API_KEY, GROQ_API_KEY); Google uses GOOGLEAI_API_KEY/GEMINI_API_KEY; Bedrock uses the chat provider’s AWS credential chain (BEDROCK_REGION/AWS_REGION, BEDROCK_PROFILE/AWS_PROFILE). The @osv, @session and @skill tools need no variables. Use @image models or /config image to view/switch backend and model at runtime.Conversation Hub (cross-channel continuity)
Carries a conversation across channels: a topic started on Telegram/Slack/WhatsApp continues in the notebook chatcli (and vice-versa), until/newsession. It is a momentary bridge with a bounded database — not long-term memory (that lives in /memory and /session). See Conversation Hub.
Every option below can also be changed at runtime by command (/config hub set <key> <value>), with precedence: setting (in hub.db) > environment variable > default. A value set by command persists in the database and is read live by the gateway daemon.
To “run chatcli + the gateway on one machine and share context”: just
CHATCLI_HUB_PRINCIPAL (or the default) — no bindings needed. For a multi-user bot, turn on CHATCLI_HUB_ISOLATE=true and use CHATCLI_HUB_BINDINGS to map who is who.LSP (Language Server Protocol — diagnostics)
Code diagnostics (compiler/linter errors and warnings) for a file, via LSP servers. Triggered manually by the/lsp <file> command. Each variable overrides the command used to start the language server for its language; when unset, ChatCLI uses the default preset (if the binary is on PATH). See LSP Diagnostics.
Web Search
Backends are keyless by design: DuckDuckGo (HTML scraping, default) + SearxNG (self-hosted via
SEARXNG_URL). See Web Tools for the fallback chain.