兼容任何
AI 工具。
一次安装。一条设置命令。lean-ctx 支持所有使用 MCP 的 AI 工具--即使不支持 MCP 的工具也能获得 shell 钩子压缩。
完整 MCP 支持
Aider
基于模式(CLI 优先 / MCP / 混合)lean-ctx init --agent aider Amazon Q Developer
基于模式(CLI 优先 / MCP / 混合)lean-ctx init --agent amazonq Amp
基于模式(CLI 优先 / MCP / 混合)lean-ctx init --agent amp Antigravity
基于模式(CLI 优先 / MCP / 混合)lean-ctx setup AWS Kiro
基于模式(CLI 优先 / MCP / 混合)lean-ctx init --agent kiro Claude Code
基于模式(CLI 优先 / MCP / 混合)lean-ctx init --agent claude Cline
基于模式(CLI 优先 / MCP / 混合)lean-ctx init --agent cline Continue
基于模式(CLI 优先 / MCP / 混合)lean-ctx setup Crush
基于模式(CLI 优先 / MCP / 混合)lean-ctx init --agent crush Cursor
基于模式(CLI 优先 / MCP / 混合)lean-ctx setup Emacs
基于模式(CLI 优先 / MCP / 混合)lean-ctx init --agent emacs Gemini CLI
基于模式(CLI 优先 / MCP / 混合)lean-ctx init --agent gemini GitHub Copilot
基于模式(CLI 优先 / MCP / 混合)lean-ctx init --agent copilot Hermes Agent
基于模式(CLI 优先 / MCP / 混合)lean-ctx init --agent hermes JetBrains IDEs
基于模式(CLI 优先 / MCP / 混合)lean-ctx init --agent jetbrains Neovim
基于模式(CLI 优先 / MCP / 混合)lean-ctx init --agent neovim OpenAI Codex
基于模式(CLI 优先 / MCP / 混合)lean-ctx init --agent codex OpenCode
基于模式(CLI 优先 / MCP / 混合)lean-ctx init --agent opencode Pi
基于模式(CLI 优先 / MCP / 混合)lean-ctx init --agent pi Qoder
基于模式(CLI 优先 / MCP / 混合)lean-ctx init --agent qoder QoderWork
基于模式(CLI 优先 / MCP / 混合)lean-ctx init --agent qoderwork Qwen Code
基于模式(CLI 优先 / MCP / 混合)lean-ctx init --agent qwen Roo Code
基于模式(CLI 优先 / MCP / 混合)lean-ctx init --agent roo Sublime Text
基于模式(CLI 优先 / MCP / 混合)lean-ctx init --agent sublime Trae
基于模式(CLI 优先 / MCP / 混合)lean-ctx init --agent trae Verdent
基于模式(CLI 优先 / MCP / 混合)lean-ctx init --agent verdent Windsurf
基于模式(CLI 优先 / MCP / 混合)lean-ctx init --agent windsurf Zed AI
基于模式(CLI 优先 / MCP / 混合)lean-ctx setup 仅 Shell 钩子 模式
不支持 MCP 的工具仍然可以从 lean-ctx 受益。Shell 钩子拦截 CLI 命令(git、npm、cargo、docker、kubectl 等 95 多个),并在 AI 读取之前压缩其输出。
拦截 git、npm、cargo、docker、kubectl、pip、go、tsc 等 80 多个命令。输出压缩 60–90%。
58 个专用工具:ctx_read、ctx_search、ctx_graph、ctx_intent、ctx_session、ctx_task、ctx_cost,另有 51 个。文件缓存、会话记忆、项目图谱、A2A 任务委托、成本归因。
$ lean-ctx setup
◆ lean-ctx Setup Wizard
────────────────────────────────────
✓ Shell detected: zsh
✓ Hook installed: ~/.zshrc
✓ AI tool detected: Cursor
✓ Hooks installed: ~/.cursor/hooks.json
✓ AI tool detected: Claude Code
✓ MCP server added: claude mcp add
────────────────────────────────────
Setup complete. Restart your shell.
2 AI tools configured, shell hook active
设置 流程
检测您的 shell
检测 zsh、bash 或 fish,并安装用于拦截 CLI 命令的 shell 钩子。
查找 AI 工具
扫描 Cursor、Claude Code、Copilot、Windsurf、Cline、Zed 等。为每个工具配置 MCP。
写入 MCP 配置
为每个工具创建正确的 JSON 配置。无需手动编辑。
基于开放标准构建
MCP(Model Context Protocol)是连接 AI 工具与外部能力的开放标准。任何未来支持 MCP 的工具都将自动兼容 lean-ctx--无需更新。
一个二进制文件。一个协议。所有 AI 工具。
契约版本管理 与稳定性
LeanCTX 是基础设施。契约是工具、配置和集成可以信赖的稳定承诺。
版本规则
- Schema 版本为整数(1, 2, 3…) —
schema_version/contract_version - 破坏性变更 — 版本号递增;旧 Schema 在之后的 2 个主版本中仍然可用
- 非破坏性变更 — 版本号保持不变;新增字段始终安全
CI 门禁
contracts_md_up_to_date确保 CONTRACTS.md 与代码保持同步mcp_manifest_up_to_date确保工具清单始终是唯一的真实来源