能力标签
ChatCLI
🔌
MCP工具

ChatCLI

基于 Go · 让 AI 助手直接操作你的系统与工具
英文名:chatcli
⭐ 88 Stars 🍴 24 Forks 💻 Go 📄 Apache-2.0 🏷 AI 8.5分
8.5AI 综合评分
aiaiopscompressioncontext-engineering
✦ AI Skill Hub 推荐

经 AI Skill Hub 精选评估,ChatCLI 获评「强烈推荐」。这款MCP工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 8.5 分,适合有一定技术背景的用户使用。

📚 深度解析

ChatCLI 是一款基于 MCP(Model Context Protocol)标准协议的 AI 工具扩展。MCP 协议由 Anthropic 开发并开源,旨在建立 AI 模型与外部工具之间的标准化通信接口,目前已被 Claude Desktop、Claude Code、Cursor 等主流 AI 工具采纳。

通过安装 ChatCLI,你的 AI 助手将获得额外的工具调用能力,可以用自然语言直接操控该工具的功能,无需学习复杂的命令行语法。MCP 工具的核心价值在于"一次配置,永久增强"——配置完成后,每次与 AI 对话时都可以无缝调用这些工具。

在技术实现上,MCP 工具通过标准的 JSON-RPC 协议与 AI 客户端通信,工具的功能以"工具列表"的形式暴露给 AI 模型,AI 可以按需调用。ChatCLI 提供了结构化的工具调用接口,使 AI 模型能够精确地理解和使用每个功能点,显著降低 AI 在工具使用上的错误率。

与传统的 API 集成相比,MCP 工具的优势在于无需编写代码——用户只需在配置文件中添加几行 JSON,即可让 AI 获得全新能力。AI Skill Hub 将 ChatCLI 评为 AI 评分 8.5 分,属于同类工具中的优质选择。

📋 工具概览

ChatCLI 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

GitHub Stars
⭐ 88
开发语言
Go
支持平台
Windows / macOS / Linux(跨平台)
维护状态
轻量级项目,按需更新
开源协议
Apache-2.0
AI 综合评分
8.5 分
工具类型
MCP工具
Forks
24

📖 中文文档

以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

ChatCLI 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

📌 核心特色
  • 通过标准 MCP 协议与 Claude、Cursor 等主流 AI 客户端深度集成
  • 提供结构化工具调用接口,显著降低 AI 集成复杂度
  • 支持 Claude Desktop 和 Claude Code 无缝接入,开箱即用
  • 可与其他 MCP 工具组合叠加,构建完整 AI 工作站
  • 轻量无侵入设计,不影响现有系统架构
🎯 主要使用场景
  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/diillson/chatcli

# 方式二:手动配置 claude_desktop_config.json
{
  "mcpServers": {
    "chatcli": {
      "command": "npx",
      "args": ["-y", "chatcli"]
    }
  }
}

# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
📋 安装步骤说明
  1. 确认已安装 Node.js(v18 或以上版本)
  2. 打开 Claude Desktop 或 Claude Code 的 MCP 配置文件
  3. 按「交给 Agent 安装 → Claude Desktop」标签中的 JSON 配置填入 mcpServers 字段
  4. 保存配置文件并重启 Claude 客户端
  5. 重启后,在对话中即可使用本工具
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 安装后在 Claude 对话中直接使用
# 示例:
用户: 请帮我用 ChatCLI 执行以下任务...
Claude: [自动调用 ChatCLI MCP 工具处理请求]

# 查看可用工具列表
# 在 Claude 中输入:"列出所有可用的 MCP 工具"
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
// claude_desktop_config.json 配置示例
{
  "mcpServers": {
    "chatcli": {
      "command": "npx",
      "args": ["-y", "chatcli"],
      "env": {
        // "API_KEY": "your-api-key-here"
      }
    }
  }
}

// 保存后重启 Claude Desktop 生效
📑 README 深度解析 真实文档 完整度 64/100 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

简介

<p align="center"> <a href="https://chatcli.edilsonfreitas.com"> <img src="https://raw.githubusercontent.com/diillson/chatcli/main/assets/chatcli.png" alt="ChatCLI Logo" width="300"> </a> </p>

ChatCLI

Unified AI platform for terminal, gRPC server, and Kubernetes.
15 providers · 14 autonomous agents · 7-pattern quality pipeline · one binary.

<a href="https://github.com/diillson/chatcli/actions/workflows/1-ci.yml"><img src="https://github.com/diillson/chatcli/actions/workflows/1-ci.yml/badge.svg" alt="CI"/></a> <a href="https://github.com/diillson/chatcli/actions/workflows/security-scan.yml"><img src="https://github.com/diillson/chatcli/actions/workflows/security-scan.yml/badge.svg" alt="Security Scan"/></a> <a href="https://github.com/diillson/chatcli/releases"><img src="https://img.shields.io/github/v/release/diillson/chatcli" alt="Release"/></a> <a href="https://artifacthub.io/packages/search?ts_query_web=chatcli&sort=relevance&page=1"><img src="https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/chatcli" alt="ArtifactHub"/></a> <a href="https://pkg.go.dev/github.com/diillson/chatcli"><img src="https://pkg.go.dev/badge/github.com/diillson/chatcli.svg" alt="Go Reference"/></a>

<br>

<img src="https://img.shields.io/github/go-mod/go-version/diillson/chatcli?label=Go" alt="Go version"/> <img src="https://img.shields.io/github/license/diillson/chatcli" alt="License"/> <img src="https://img.shields.io/github/last-commit/diillson/chatcli" alt="Last commit"/> <img src="https://img.shields.io/github/languages/code-size/diillson/chatcli" alt="Code size"/> <img src="https://img.shields.io/badge/platforms-linux%20%7C%20macOS%20%7C%20windows-informational" alt="Platforms"/> <img src="https://img.shields.io/badge/Trivy-image%20scanning-00C9A7?logo=aquasecurity" alt="Trivy"/> <img src="https://img.shields.io/badge/Sigstore-cosign%20signed-4B32C3?logo=sigstore" alt="Cosign Signed"/> <img src="https://img.shields.io/badge/SBOM-CycloneDX-green" alt="SBOM"/> <img src="https://img.shields.io/badge/observability-Prometheus-E6522C?logo=prometheus" alt="Prometheus"/>

</div>

<br>

<p align="center"> <a href="README_PT.md">Português</a> &bull; <a href="https://chatcli.edilsonfreitas.com">Full documentation</a> &bull; <a href="#architecture">Architecture</a> &bull; <a href="#observability">Observability</a> </p>

---

<p align="center"> <img src="https://raw.githubusercontent.com/diillson/chatcli/main/assets/chatcli-demo.gif" alt="ChatCLI Demo" width="800"> </p>

<br>

ChatCLI connects the industry's leading LLMs to a single, extensible interface — from chatcli -p in your terminal to a Kubernetes operator with an autonomous AIOps pipeline, passing through a production-ready gRPC server with authentication, failover, and Prometheus metrics.

<br>

Highlights

**Multi-provider with failover**14 LLM providers (OpenAI · OpenAI Responses · Anthropic · Bedrock · Google · xAI · ZAI · MiniMax · Moonshot (Kimi) · Copilot · StackSpot · OpenRouter · Ollama · Devin CLI) with intelligent error classification, exponential backoff, and per-provider cooldown. The Devin provider wraps the local Devin CLI as an LLM transport — no undocumented Cognition APIs, full ChatCLI harness and headroom on top.
**Autonomous agents**14 built-in workers coordinated by a ReAct engine (Reason + Act): 12 orchestration specialists run in parallel + 2 quality agents (refiner, verifier), plus a 7-pattern quality pipeline.
**Quality pipeline**Self-Refine, Chain-of-Verification (CoVe), Reflexion, RAG + HyDE, Plan-and-Solve (ReWOO), cross-provider reasoning backbone — all composed via a thread-safe state machine with circuit breakers and hot reload.
**Scheduler (Chronos)**Durable scheduling with cron + wait-until + DAG + daemon mode. /schedule, /wait, /jobs + @scheduler tool for agents. CRC32 WAL, snapshots, rate limiter, circuit breakers, JSONL audit, 13 Prometheus metrics. Jobs survive crashes and CLI exit.
**Durable Reflexion**WAL-backed queue with worker pool, dead letter queue, boot replay, exponential retry with jitter — lessons survive process crashes.
**Semantic convergence**char → Jaccard → embedding cosine cascade for Self-Refine, with LRU/TTL cache and quality regression detection.
**Production-ready**gRPC + TLS 1.3, JWT + RBAC, AES-256-GCM, rate limiting, audit logging, 50+ Prometheus metrics.
**Kubernetes-native**Operator with 17 CRDs and an autonomous AIOps pipeline (54+ remediation actions), SLO monitoring, post-mortems.
**Extensible**Plugins with Ed25519 signature verification, multi-registry skills (skills.sh, ClawHub, ChatCLI.dev), slash-command templates with 9-CLI interop (Claude Code, Devin, Gemini, Codex, …), lifecycle hooks, MCP client (stdio, SSE, HTTP + OAuth).

---

Core Features

Every feature is designed to compose with the others. Plugins discover skills. Hooks drive tools. Contexts feed agents.
FeatureDescription
**Native tool calling**Native APIs from OpenAI, Anthropic, Bedrock, Google, ZAI, MiniMax, Moonshot, OpenRouter. ephemeral cache for Anthropic. Automatic XML fallback for providers without native support.
**Browser automation (@browser)**Drives a real local Chrome/Chromium/Brave/Edge over the DevTools Protocol — spoken straight over the shipped websocket client, **no new dependency, no driver, no key**. open/snapshot (page as text with numbered interactive elements)/click/type/eval/screenshot/console/network. The verification loop for web work: build a frontend, then SEE it and debug it from its console/network. CHATCLI_BROWSER_BIN, CHATCLI_BROWSER_HEADLESS.
**Git forge (@forge)**Pull requests, issues and CI through the user's OWN authenticated gh/glab — **keyless**, auto-detected from the git remote. pr-list/view/diff/checks/create/comment, issue-*, ci-status, ci-logs (failed-step logs). Closes the loop branch → PR → watch CI → fix without leaving the agent; reads auto-approved, mutations behind the security gate.
**Image input (@view)**The agent LOOKS at a local image mid-task — a @browser screenshot, a mock, a diagram — through the vision pipeline (native multimodal or describe-fallback), staged and attached on the next turn.
**Task graph (@taskgraph)**An approved multi-task plan becomes a persisted DAG: independent tasks run in parallel on squad workers, dependencies gate execution, and *done is never the executor's self-report* — the engine runs each task's validation commands itself and a fresh reviewer worker issues the verdict (done or retry with feedback). Real per-task cost from provider usage, shadow-git checkpoint before each executor, resumable runs under ~/.chatcli/taskgraph/. Humans watch mid-run via /taskgraph (status, per-task evidence, cancel) or the **live browser dashboard** (/taskgraph dash): animated DAG canvas with phase swimlanes, pan/zoom, per-task popovers with reviewer evidence and gate outputs, critical path and real per-task cost — served read-only on 127.0.0.1, so closing it never affects the run. Worth it from ~5+ genuinely independent tasks.
**Exec sandbox**Opt-in OS-level confinement for @coder exec: CHATCLI_CODER_SANDBOX=off\|workspace\|strict\|docker. Native sandbox-exec (macOS) / bwrap (Linux) / **Docker-Podman container on ANY OS incl. Windows**; strict also cuts the network. Confines what a permitted command can touch, on top of the validator and policy that gate what runs.
**Shadow-git checkpoints**An automatic workspace snapshot before every mutating @coder subcommand, into a shadow git repo under ~/.chatcli — your own .git is never touched. @coder checkpoint {list,create,restore} rewinds multi-file edits and exec side effects. Snapshots are bounded: workspaces as broad as your home directory are never auto-snapshotted, each snapshot runs under a hard deadline (CHATCLI_CODER_CHECKPOINT_TIMEOUT seconds), and repeated failures back off and disable snapshots for the session. CHATCLI_CODER_CHECKPOINTS=off.
**Post-edit diagnostics**After a successful @coder write/patch, the language server's diagnostics for the touched files are auto-injected into the tool result — a broken edit is caught turns earlier than a failing test. CHATCLI_CODER_AUTODIAG=off. Plus @coder outline/map for code-structure orientation (repo map via go/ast) without reading whole files.
**Interactive processes (@proc pty)**@proc start {pty:true} runs a program on a real pseudo-terminal (REPLs, debuggers, ssh) and @proc stdin types into it — programs that demand a TTY no longer dead-end the agent (Unix-first).
**MCP (Model Context Protocol)**Client via stdio, SSE, and streamable HTTP for expanded context. Remote (HTTP/SSE) servers gated behind OAuth 2.1 are supported end-to-end: on a 401 the client discovers the authorization server (RFC 9728/8414), registers dynamically (RFC 7591), runs a PKCE browser flow, and refreshes tokens transparently (stored AES-256-GCM in the encrypted auth store). Authorize with /mcp login <server>, or let the agent call the @mcp-login tool when a call reports "authorization required". Server (chatcli mcp-server) exposes the FULL surface: every built-in tool with read-only annotations, the agent/coder loops with per-call provider/model routing and quality-harness toggles, provider discovery, and all installed skills served as MCP prompts — plus every tool discovered from the MCP servers ChatCLI itself is connected to, re-exported under their mcp_* names with the origin JSON Schema intact (ChatCLI as an MCP hub: many servers aggregated behind one endpoint, with tools/list_changed notifications as they connect). Exposure policy via CHATCLI_MCP_TOOLS (all/safe/allowlist; safe honors the origin readOnlyHint, allowlists name proxied tools as mcp_<tool>). Clients also get manage_session (save/load/attach/detach/status/list/delete/clear/search/fork the conversations behind ask_chatcli's session parameter, sharing the /session store; save/load/attach bind the live session so every turn is written through and writes from other surfaces — REPL, gateway, another server — are adopted before each turn: cross-surface session continuity) and list_providers with live API model listings merged with the catalog — the same discovery the interactive picker uses. **Full-experience parity**: ask_chatcli runs the SAME pipeline as an interactive turn — the user's long-term memory and profile, /context attachments per session, pinned and trigger-activated skills, knowledge retrieval and token-aware compaction (plain=true keeps a raw passthrough) — and agent_task runs the real ReAct loop with session-scoped contexts. Local state is browsable as **MCP resources** under chatcli:// URIs (memory index/longterm/profile/projects, contexts, knowledge TOC + paged documents, skills with triggers, saved sessions; CHATCLI_MCP_RESOURCES=off disables). The server joins the **conversation hub in resume mode**, so a thread started in the REPL or on a gateway channel continues from any MCP client (CHATCLI_MCP_HUB=off opts out, CHATCLI_MCP_HUB_PRINCIPAL isolates). Dangerous commands auto-approve like the gateway daemon; set CHATCLI_MCP_DANGER=block to decline them in-band instead. ACP server (chatcli acp) with chat/agent/coder session modes, live streaming, cancellation and session/load restore (capability loadSession: true — a prior session id comes back from live state or its autosave mirror, with the conversation replayed to the client; /session from the prompt box operates per session and joins the same cross-surface continuity), for editors (Zed) and agent-to-agent use.
**Chat Gateway**Runs as a messaging daemon (Telegram, Slack, Discord, WhatsApp, webhook): each message runs through the agent loop and progress is streamed back to the chat. Voice messages are transcribed (local-first whisper) and answered in voice by default (CHATCLI_GATEWAY_VOICE_REPLY=auto\|always\|never); each conversation controls it by asking in natural language ("answer me in audio" / "stop sending audio") via the @voice tool, with the preference persisted.
**Embedded voice (TTS)**CHATCLI_TTS_PROVIDER=embedded — offline Kokoro neural voice, no API key and no cgo: downloads the sherpa-onnx engine + model once (~150MB) and works the same on Linux/macOS/Windows. Routes pt-BR/English by reply language (CHATCLI_TTS_VOICE=bm_george, CHATCLI_TTS_VOICE_PT=pm_alex); the other backends (say/espeak, self-hosted, OpenAI/Groq/Gemini) remain available.
**Embedded transcription (STT)**Offline multilingual Whisper via sherpa-onnx, no API key and no cgo — and the automatic fallback: with nothing configured, the gateway downloads the engine + an ONNX model once (~200MB for base; CHATCLI_TRANSCRIPTION_MODEL=tiny\|base\|small\|…) at startup and transcribes voice notes auto-detecting the spoken language. OGG/Opus voice notes (Telegram/WhatsApp) decode in pure Go — no ffmpeg needed; only residual formats (mp3/m4a) require ffmpeg, and the gateway preflight + /gateway status warn with your platform's install command. CHATCLI_TRANSCRIPTION_PROVIDER=embedded forces it over the other backends (local whisper CLI, self-hosted, Groq/OpenAI), which remain available.
**Mixture-of-Agents**/moa — several models propose in parallel and an aggregator synthesizes (Wang et al., 2406.04692). Every participant gets the same briefing as a chat turn (attached contexts, workspace memory, skills) plus read-only knowledge retrieval, CCR recall and long-term memory recall.
**Model routing (@model)**The agent routes itself: @model list shows every provider's models with a price-derived tier (fast-cheap/balanced/frontier), cost per 1M tokens, context window and capabilities; use switches the rest of the task to another model/provider (task-scoped, never mutates the session); delegate one-shots a subtask on a cheaper model keeping the main loop's history and prompt cache intact. Kill switch: CHATCLI_AGENT_MODEL_TOOL=false.
**LSP diagnostics**/lsp <file> — compiler errors/warnings via the Language Server Protocol (gopls, pyright, rust-analyzer, clangd, …).
**Rate limits**/ratelimit — provider limits parsed from x-ratelimit-* headers (requests/tokens, % used, reset).
**Trajectory export**/export — current conversation as ShareGPT JSONL for fine-tuning/analysis.
**Persistent contexts**/context create, /context attach — inject whole projects into the system prompt with cache hints.
**Knowledge base (keyless RAG)**/context create docs corpus.jsonl --mode knowledge — documentation corpora (e.g. JSONL from the builtin @docs-flatten tool, which flattens local or git-repo Markdown/MDX docs) become a knowledge base: attaching injects only an index card (~900 fixed tokens, even at 6MB+) and relevant passages are retrieved per turn via pure-Go BM25 (no API key) + embeddings when configured. The @knowledge tool (search/get/toc) interrogates the base iteratively in agent/coder and also in chat (read-only exception, /config chat knowledge) — including authoring skills from the docs with @skill.
**Bootstrap & Memory**SOUL.md, USER.md, IDENTITY.md, RULES.md + long-term memory with facts (confidence + provenance + contradiction reconciliation), topics with rolling summaries, and decay.
**Self-evolution**Skills author and evolve themselves on the memory extraction pass (no extra LLM call): reusable procedures become auto-activating skills; an insight evolves an existing skill by additive merge, with a reversible backup (@skill restore). CHATCLI_SELFEVOLVE_MODE=off\|suggest\|auto; observability under /config selfevolve.
**Knowledge graph (Obsidian in the core)**Facts, topics, projects, skills and tags become an on-demand graph: @memory neighbors <subject> / map pull backlinks and related notes, a tiny index card rides each turn, and /graph [subject] renders the graph to an image (embedded go-graphviz). CHATCLI_GRAPH_INDEX=on\|off.
**Plugins**Auto-detection, schema validation, Ed25519 signatures, remote plugins.
**Skills**Self-authoring (@skill), multi-registry (skills.sh, ClawHub, ChatCLI.dev), fuzzy search, security audits, source preferences, atomic install.
**Slash commands**Markdown prompt templates invoked as /name args on EVERY surface (REPL, coder mid-run, one-shot, gateway, ACP, MCP prompts) and with every provider — expansion is pure prompt rewriting. Project .chatcli/commands/ + personal ~/.chatcli/commands/, with **zero-migration interop** for Claude Code, Devin, Windsurf, Cursor, opencode, Codex, Gemini CLI, Qwen Code and GitHub Copilot command files (their placeholder and TOML dialects included). ! pre-execution runs through the coder security gate; allowed-tools scopes the run; the model discovers the catalog via @commands. A command that needs tools declares mode: coder (inferred automatically when allowed-tools is present) and, invoked from chat, is **auto-routed through a coder one-shot run** — it executes and returns to chat instead of being refused by the tool-less chat mode (mode: chat vetoes the inference; opt out globally with CHATCLI_COMMANDS_AUTOROUTE=off). Panel under /config commands.
**Custom personas**Markdown with YAML frontmatter (model, tools, skills).
**Hooks**PreToolUse, PostToolUse, SessionStart/End, UserPromptSubmit, Pre/PostCompact — shell or webhook.
**WebFetch / WebSearch**DuckDuckGo + fetch with text extraction.
**Cost tracking**Real API usage across all providers, /cost (+ reset, last, sessions, export), session budgets with optional hard stop, persisted snapshots.
**Git Worktrees**Isolated work on parallel branches.
**K8s Watcher**Multi-target: metrics, logs, events, Prometheus scraping.
**i18n**Portuguese and English with automatic detection.
**Session management**Save, load, fork, export.

---

Installation

```bash

Go install

go install github.com/diillson/chatcli@latest

Quick Setup

LLM_PROVIDER=OPENAI    # OPENAI, CLAUDEAI, BEDROCK, GOOGLEAI, XAI, ZAI, MINIMAX, MOONSHOT,
                       # COPILOT, OLLAMA, STACKSPOT, OPENROUTER
OPENAI_API_KEY=sk-xxx

<details> <summary><strong>Full provider configuration reference</strong></summary>

ProviderAPI KeyModelExtras
OpenAIOPENAI_API_KEYOPENAI_MODELOPENAI_MAX_TOKENS, OPENAI_USE_RESPONSES, OPENAI_API_URL
AnthropicANTHROPIC_API_KEYANTHROPIC_MODELANTHROPIC_MAX_TOKENS
AWS BedrockIAM / SSO / aws login / credentials chainBEDROCK_MODELBEDROCK_PROFILE or AWS_PROFILE, BEDROCK_REGION or AWS_REGION, BEDROCK_CROSS_REGION
Google GeminiGOOGLEAI_API_KEYGOOGLEAI_MODELGOOGLEAI_MAX_TOKENS
xAIXAI_API_KEYXAI_MODELXAI_MAX_TOKENS
ZAIZAI_API_KEYZAI_MODELZAI_MAX_TOKENS, ZAI_USE_CODING_PLAN, ZAI_THINKING, ZAI_API_URL
MiniMaxMINIMAX_API_KEYMINIMAX_MODELMINIMAX_MAX_TOKENS
Moonshot (Kimi)MOONSHOT_API_KEYMOONSHOT_MODELMOONSHOT_MAX_TOKENS, MOONSHOT_THINKING
GitHub CopilotGITHUB_COPILOT_TOKENCOPILOT_MODELor /auth login github-copilot
StackSpotCLIENT_ID, CLIENT_KEYSTACKSPOT_REALM, STACKSPOT_AGENT_ID
OpenRouterOPENROUTER_API_KEYOPENROUTER_MAX_TOKENS, OPENROUTER_FALLBACK_MODELS, OPENROUTER_API_URL
OllamaOLLAMA_MODELOLLAMA_ENABLED=true, OLLAMA_BASE_URL
OpenAI (Responses API)OPENAI_API_KEYOPENAI_MODELOPENAI_RESPONSES_API_URL
Removed provider — GitHub Models. GitHub retired GitHub Models on July 30 2026 (playground, model catalog, inference API and BYOK, for every customer), so the GITHUB_MODELS provider was dropped. The env vars GITHUB_MODELS_MODEL, GITHUB_MODELS_TOKEN, GITHUB_MODELS_MAX_TOKENS and GITHUB_MODELS_API_URL no longer have any effect, and GITHUB_MODELS is no longer accepted as a provider value (including in the operator's Instance CRD). GitHub Copilot is a different product and is unaffected — if you were on GitHub Models for OpenAI models, COPILOT or OPENAI are the direct replacements.

Environment file (.env) discovery

ChatCLI looks for its environment file in this order, and the first file that exists wins:

  1. $CHATCLI_DOTENV (explicit; honored even when missing, so a typo is reported instead of silently ignored)
  2. ./.env — the working directory
  3. ~/.chatcli/.env
  4. ~/.env

The home fallbacks matter for the non-interactive surfaces: an editor spawning chatcli acp, or an MCP client spawning chatcli mcp-server, does not run your shell profile — CHATCLI_DOTENV and any variable you export from .zshrc/.bashrc never reach the child process, and its working directory is the project, which usually has no .env. Before this fallback existed those servers ran with no environment file at all: providers keyed by an env var disappeared and AWS_PROFILE went missing, so Bedrock authenticated as the default profile instead of the account you logged into. Keep your file at ~/.chatcli/.env (or ~/.env) and every surface agrees. /config shows the file in effect, its origin, and the effective AWS profile.

Per-project settings: the ACP server also layers the .env of the project the editor opened (session/new's cwd) on top, fill-only — it can add variables you have not set, never override one already in effect, and only the first project announced applies. Because a project directory is untrusted input, CHATCLI_PROJECT_ENV=safe (the default) refuses credential and endpoint variables (*_API_KEY, *_TOKEN, *_BASE_URL, *_API_URL, …) from that file; all accepts everything, off disables the overlay.

Custom endpoints and OpenAI-compatible gateways

  • OPENAI_API_URL overrides the OpenAI chat completions endpoint. It must be the full chat completions URL (e.g. https://gateway.example.com/v1/chat/completions) — the /models listing URL is derived from it.
  • Authentication is unchanged: requests carry Authorization: Bearer $OPENAI_API_KEY, so when redirecting to a gateway set OPENAI_API_KEY to the gateway's key. Do not combine a third-party URL with an OAuth login (/auth login openai) — the OAuth token would be sent to the gateway.
  • OPENAI_RESPONSES_API_URL overrides the Responses API endpoint. A custom OPENAI_API_URL (different host) forces the chat completions surface — the catalog preference for the Responses API (e.g. gpt-5.4, the default) only applies on the official host, so a gateway key is never sent to api.openai.com. Effective precedence: OAuth > OPENAI_USE_RESPONSES=true > custom OPENAI_API_URL host (chat completions) > model catalog preference > OPENAI_USE_RESPONSES=false. If your gateway does expose the Responses API, opt in with OPENAI_USE_RESPONSES=true and set OPENAI_RESPONSES_API_URL too.
  • When the endpoint URL points to a custom host, the model listing is not filtered by model family — every model the gateway returns on /models appears in the autocomplete and /switch --model. Against the official endpoint, the listing keeps only chat-capable families (hiding embeddings, whisper, tts, dall-e, moderation). The same rule applies to ZAI_API_URL, MOONSHOT_API_URL and MINIMAX_API_URL.
  • To use a third-party OpenAI-compatible gateway as a provider separate from OpenAI (including in the server fallback chain), point the OpenRouter preset at it: LLM_PROVIDER=OPENROUTER with OPENROUTER_API_KEY and OPENROUTER_API_URL=https://gateway.example.com/v1/chat/completions.

Z.AI GLM Coding Plan (subscription)

  • ZAI_USE_CODING_PLAN=true points the ZAI provider at the subscription endpoint (https://api.z.ai/api/coding/paas/v4/chat/completions). The same platform API key works on both endpoints — the /coding/ path is what makes requests draw from the plan instead of pay-as-you-go credits.
  • The plan serves glm-5.3 and glm-5.3-flash; requests for older GLM ids are routed to them server-side. /cost reports these calls at $0: usage is covered by the subscription, not billed per token.
  • An explicit ZAI_API_URL always wins over the toggle — set it to the full chat completions URL (e.g. the mainland endpoint https://open.bigmodel.cn/api/coding/paas/v4/chat/completions). Any URL with an /api/coding/ path is treated as plan usage.
  • ZAI_THINKING=enabled|disabled controls the GLM thinking mode on both the plain and tool-calling paths (unset keeps the backend default; enabled also preserves interleaved reasoning across turns).

</details>

---

Deploy + K8s wait + trigger smoke

/schedule deploy --when +0s --do "shell: terraform apply -auto-approve" \ --wait "k8s:deployment/prod/api:Available" --timeout 15m \ --triggers smoke-tests

Configurable fallback chain

CHATCLI_FALLBACK_PROVIDERS=OPENAI,CLAUDEAI,BEDROCK,ZAI,MINIMAX,MOONSHOT,OPENROUTER ```

/thinking on|off|auto enables extended thinking / reasoning_effort on any provider that supports it — the cross-provider mapping is automatic.

---

Daemon to keep running with the CLI closed

chatcli daemon start --detach chatcli daemon status

Command Reference

CategoryCommands
**Core**/help · /version · /update [check] · /reload · /exit · /reset
**Sessions**/session {save,load,attach,detach,status,list,delete,new,fork,search} · /export · /newsession · /rewind
**Context**/context {create,attach,list,remove} · @git · @file · @env · @history · @command
**Config**/config [section] · /status · /settings · /switch <provider\|model>
**Agent mode**/agent [task] · /run · /coder · /plan [query] · /moa <prompt>
**Quality pipeline**/thinking [on\|off\|auto] · /refine [draft] · /verify [answer] · /reflect [list\|failed\|retry\|purge\|drain\|<text>]
**Memory & graph**/memory {longterm,list,profile,facts,remember,forget,profile set,compact} · @memory (remember/recall/forget/profile/neighbors/map) — profile with lifecycle: list fields upsert (restating an item supersedes instead of duplicating) and _replace/_done/_remove key suffixes rewrite (e.g. goals_done= removes the finished goal; record milestone= and certifications= alongside); new interests, directives (hard rules vs preferences; per-project scope with "[scope:<project>] rule" — injected only when the matching workspace is active), milestone (dated timeline), stance (technical position with its why, "position :: reason") and env_<key> (structured environment) fields; per-field provenance+freshness (user vs extraction, re-affirmation bumps confirmed_at, aging fields get flagged as possibly stale) and a privacy tier (finance/health/family keys auto-tagged [sensitive]: they personalize answers but never enter code/examples/artifacts; sensitive_mark/sensitive_unmark); daily notes consolidate into weekly and monthly digests (Trajectory section in context); profile updates also work in chat (sanctioned exception, /config chat memory, CHATCLI_CHAT_MEMORY) · /graph [subject] · /compact [ratio]
**Extensibility**/mcp {init,list,invoke,config} · /plugin {list,load,unload} · /skill <name> · /hooks {list,enable,disable,test}
**Messaging & Servers**/gateway {start,status} (Telegram/Slack/Discord/WhatsApp/webhook) · chatcli mcp-server · chatcli acp
**Remote**/auth {login,logout,status} · /connect <server> · /disconnect
**Tools**/watch {pid\|file} · /worktree {create,list,remove} · /channel {create,switch} · /websearch <query> · /lsp <file> — plus agent builtins @browser, @forge, @view, @proc (background + interactive PTY), @taskgraph (verified DAG orchestration, watch with /taskgraph), and @coder subcommands outline/map/checkpoint
**Scheduler**/schedule <name> --when <t> --do <a> · /wait --until <cond> · /jobs {list,show,tree,cancel,pause,resume,logs,daemon} · chatcli daemon {start,stop,status,ping,install}
**Diagnostics**/metrics · /cost · /ratelimit (/limits)

---

Harness/Quality Pipeline

Seven prompting/execution patterns composed via a pluggable pipeline with state machine, hot reload, and per-hook isolation.
#PatternStatusOpt-in
1**ReAct** (Reason + Act)✅ agent core
2**Plan-and-Solve / ReWOO**/plan, CHATCLI_QUALITY_PLAN_FIRST_MODE
3**Reflexion** (with durable queue)on by default
4**RAG + HyDE**CHATCLI_QUALITY_HYDE_ENABLED=1
5**Self-Refine** (with semantic convergence)CHATCLI_QUALITY_REFINE_ENABLED=1
6**Chain-of-Verification** (CoVe)CHATCLI_QUALITY_VERIFY_ENABLED=1
7**Cross-provider reasoning backbone**CHATCLI_QUALITY_REASONING_MODE=auto

Pipeline Architecture

  • State machine (Active → Draining → Closed) with atomic CAS transitions.
  • Copy-on-Write via atomic.Pointer[snapshot]AddPre/AddPost/SwapConfig are atomic, zero locks on the hot path.
  • Per-hook isolation: panic recovery, timeout enforcement (default 30s), circuit breaker (5 failures → open for 30s).
  • Priority-based ordering via optional Prioritized interface (backward-compatible — unmarked hooks default to 100).
  • Short-circuit sentinels: ErrSkipExecution (cache-hit before agent.Execute) and ErrSkipRemainingHooks (ensemble patterns).
  • Graceful shutdown via DrainAndClose(timeout) honoring in-flight calls.
🎯 aiskill88 AI 点评 A 级 2026-06-28

高质量的MCP工具,功能强大

📚 实用指南(长尾问题)
适合谁
  • 需要让 Claude / Cursor 操作本地工具的 AI 工程师
  • 构建多智能体协作系统的 Agent 开发者
  • 构建企业知识库 / RAG 检索应用的团队
  • 跨境业务、多语言内容运营团队
  • 做语音类 AI 产品的开发者
最佳实践
  • 配置 MCP 服务器时建议使用 stdio 传输 + JSON-RPC,避免暴露公网
  • 生产部署优先使用 Docker Compose 隔离依赖,并挂载 volume 持久化数据
  • 本地部署优先选 GGUF 量化模型,节省显存并保持响应速度
  • 分块大小建议 256-512 tokens,向量库优选 pgvector 或 Qdrant
  • Agent 任务先做 dry-run 验证工具调用链,再开启自主执行
常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • MCP 配置路径拼错或权限不足,重启 Claude Desktop 才生效
  • 容器内无法访问宿主机 localhost — 使用 host.docker.internal
  • embedding 模型与查询模型不一致导致检索失效
  • 显存不足直接 OOM — 优先降低 context 或换更小的量化模型
部署方案
  • Docker:chatcli 提供官方镜像,docker compose up 一键启动
  • CLI:直接 npm install -g / pip install,命令行调用
  • 本地部署:CPU 8GB 起,GPU 推荐 16GB+ 显存
  • 云端托管:可放在 Vercel / Railway / Fly.io 等 PaaS 平台
相关搜索
chatcli 中文教程chatcli 安装报错怎么办chatcli MCP 配置chatcli Docker 部署chatcli Agent 工作流chatcli 与同类工具对比chatcli 最佳实践chatcli 适合谁用

⚡ 核心功能

👥 适合谁
  • 需要让 Claude / Cursor 操作本地工具的 AI 工程师
  • 构建多智能体协作系统的 Agent 开发者
  • 构建企业知识库 / RAG 检索应用的团队
  • 跨境业务、多语言内容运营团队
⭐ 最佳实践
  • 配置 MCP 服务器时建议使用 stdio 传输 + JSON-RPC,避免暴露公网
  • 生产部署优先使用 Docker Compose 隔离依赖,并挂载 volume 持久化数据
  • 本地部署优先选 GGUF 量化模型,节省显存并保持响应速度
  • 分块大小建议 256-512 tokens,向量库优选 pgvector 或 Qdrant
⚠️ 常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • MCP 配置路径拼错或权限不足,重启 Claude Desktop 才生效
  • 容器内无法访问宿主机 localhost — 使用 host.docker.internal
  • embedding 模型与查询模型不一致导致检索失效

👥 适合人群

Claude Desktop / Claude Code 用户AI 工具开发者需要扩展 AI 能力的专业人士自动化工程师

🎯 使用场景

  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站

⚖️ 优点与不足

✅ 优点
  • +Apache-2.0 协议,可免费商用
  • +标准化 MCP 协议,生态互联性强
  • +与 Claude 官方生态无缝对接
  • +即插即用,配置简单快捷
⚠️ 不足
  • 依赖 Claude 客户端,非 Claude 用户无法使用
  • MCP 协议仍在持续演进,接口可能变更
  • 需要一定的配置步骤
⚠️ 使用须知

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。

🔗 相关工具推荐

📰 相关 AI 新闻
🍿 AI 圈相关吃瓜
🗺️ 相关解决方案
🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合

❓ 常见问题 FAQ

chatcli 是一款Go开发的AI辅助工具。开源MCP工具:ChatCLI é uma aplicação de linha de comando que utiliza modelos de linguagem com。⭐88 · Go 主要应用场景包括:自动化对话处理。
💡 AI Skill Hub 点评

AI Skill Hub 点评:ChatCLI 的核心功能完整,质量优秀。对于Claude Desktop / Claude Code 用户来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。

⬇️ 获取与下载
⬇ 下载源码 ZIP

✅ Apache-2.0 协议 · 可免费商用 · 直接从 aiskill88 服务器下载,无需跳转 GitHub

📚 深入学习 ChatCLI
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 chatcli
原始描述 开源MCP工具:ChatCLI é uma aplicação de linha de comando que utiliza modelos de linguagem com。⭐88 · Go
Topics aiaiopscompressioncontext-engineering
GitHub https://github.com/diillson/chatcli
License Apache-2.0
语言 Go
🔗 原始来源
🐙 GitHub 仓库  https://github.com/diillson/chatcli 🌐 官方网站  https://chatcli.edilsonfreitas.com/

收录时间:2026-06-28 · 更新时间:2026-07-03 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。

📺 订阅 AI Skill Hub Daily Telegram 频道
每天 8 条精选 AI Skill、MCP、Agent 与自动化工具推送
加入频道 →