面向AI代理的开放上下文运行时。
厂商中立、本地优先的基础设施层,管理您的AI看到什么、记住什么和关注什么。一个二进制文件。零配置。29+个AI工具。开源。
curl -fsSL https://leanctx.com/install.sh | sh AI 工具把噪音灌进模型。
每次读文件、每条 shell 命令、每个搜索结果 - 你的 AI 都会不加过滤地发送给模型。结果:响应更慢、成本更高,AI 在自己的上下文窗口里失去焦点。
“瓶颈不在模型,而在你喂给它的内容。”
Four capabilities. One runtime.
LeanCTX sits between your AI and your codebase. It handles the full context lifecycle — from file read to model delivery.
Compress
10 read modes with Tree-sitter AST parsing for 18 languages. Strips noise, keeps structure. Cached re-reads cost ~13 tokens.
Remember
Cross-session memory, knowledge graphs, and context checkpoints. Your AI remembers decisions, discoveries, and file relationships.
Govern
Profiles, roles, budgets, and SLOs. Control what each agent sees, how much it spends, and when it gets throttled.
Verify
82个Lean4定理证明策略和压缩不变量。基于声明的验证,支持Quality Levels 0-4。无静默数据丢失。
在你的终端中的样子。
lean-ctx 在幕后静默工作。当你的 AI 读取文件时,它透明地压缩输出。这是一个真实的 ctx_read 调用和指标仪表盘。
适用于所有主要 AI 编码工具。
Cursor、Claude Code、GitHub Copilot、Windsurf、Crush、Codex--lean-ctx 与所有工具集成。零厂商锁定,零逐工具配置。安装一次,处处受益。
Frequently Asked Questions
What is LeanCTX?
LeanCTX 是 AI 开发的 Context OS。它位于你的 AI 编程工具和代码库之间,将文件读取压缩高达 99%,跨会话持久化记忆,并在交付前验证所有输出。支持 29+ AI 工具,包括 Cursor、Claude Code 和 GitHub Copilot。
LeanCTX 能节省多少 Token 成本?
活跃开发者每月可节省 $30-100+ 的 AI API 成本。文件读取压缩 60-99%,Shell 输出压缩 60-95%,缓存重读仅需 13 个 Token。使用 lean-ctx gain 测量你的个人节省。
LeanCTX 能与 Cursor / Claude Code / Copilot 配合使用吗?
可以。LeanCTX 开箱即用支持 29+ AI 编程工具。运行 lean-ctx setup 即可自动检测和配置所有已安装的编辑器。支持三种集成模式:CLI-Redirect、Hybrid 和 Full MCP。
LeanCTX 是免费开源的吗?
是的。LeanCTX 在 MIT + Apache-2.0 双重许可证下完全开源。零遥测,一切在本地运行。单一 Rust 二进制文件可通过 npm、cargo 或直接下载获取。
What is Context OS?
Context OS 是管理 AI 上下文完整生命周期的架构。它有六大支柱:Smart I/O(压缩)、Intelligence(路由)、Memory(持久化)、Governance(控制)、Verification(证明)和 Integrations(29+ 工具)。它用系统化的运行时取代了临时的提示工程。
给你的AI它应得的上下文。
AI编程的瓶颈不是模型--而是上下文。lean-ctx在信息到达LLM之前对其进行整形。一个Rust二进制文件。无需云端。Apache-2.0。