控制 what 你的 AI can see. LeanCTX (Lean Con 文本)是 the con 文本 intelligence layer 为 AI agents — one 本地 Rust binary decides what 它们 read, remembers what 它们 learn, guards what 它们 touch,、proves what 它们 save. 60–90% fewer 令牌 s asreceipt. 76 MCP 工具 s, 30+ agents, 本地优先.该项目在 GitHub 已获得 2,846 星标(278 分叉),代码活跃度高。主要编程语言为 Rust,采用 Apache-2.0 开源协议。主要标签:agentic-coding、ai、ai-agents、ai-coding、claude-code。
项目简介
控制 what 你的 AI can see. LeanCTX (Lean Con 文本)是 the con 文本 intelligence layer 为 AI agents — one 本地 Rust binary decides what 它们 read, remembers what 它们 learn, guards what 它们 touch,、proves what 它们 save. 60–90% fewer 令牌 s asreceipt. 76 MCP 工具 s, 30+ agents, 本地优先.
核心功能
- Longer useful coding sessions — less context waste = more room for actual code reasoning - Lower API costs — 60–90% fewer tokens on reads and shell output, cached re-reads cost ~13 tokens - No more "I already showed you this file" — session memory persists across chats - Works with your existing setup — one `lean-ctx setup` command, no config changes needed - Full visibility — see exactly where your context window budget goes
使用指南
<p> <a href="https://github.com/yvgude/lean-ctx/stargazers"><img src="https://img.shields.io/github/stars/yvgude/lean-ctx?style=social" alt="GitHub Stars"></a> <a href="https://github.com/yvgude/lean-ctx/actions/workflows/ci.yml"><img src="https://github.com/yvgude/lean-ctx/actions/workflows/ci.yml/badge.svg" alt="CI"></a> <a href="https://github.com/yvgude/lean-ctx/actions/workflows/security-check.yml"><img src="https://github.com/yvgude/lean-ctx/actions/workflows/security-check.yml/badge.svg" alt="Security"></a> <a href="https://crates.io/crates/lean-ctx"><img src="https://img.shields.io/crates/v/lean-ctx?color=%23e6522c" alt="crates.io"></a> <a href="https://crates.io/crates/lean-ctx"><img src="https://img.shields.io/crates/d/lean-ctx?color=%23e6522c" alt="Downloads"></a> <a href="https://www.npmjs.com/package/lean-ctx-bin"><img src="https://img.shields.io/npm/v/lean-ctx-bin?label=npm&color=%23cb3837" alt="npm"></a> <a href="https://aur.archlinux.org/packages/lean-ctx"><img src="https://img.shields.io/aur/version/lean-ctx?color=%231793d1" alt="AUR"></a> <a href="https://pi.dev/packages/pi-lean-ctx"><img src="https://img.shields.io/badge/Pi.dev-pi--lean--ctx-6366f1?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJ3aGl0ZSI+PHRleHQgeD0iNCIgeT0iMTgiIGZvbnQtc2l6ZT0iMTYiIGZvbnQtZmFtaWx5PSJzZXJpZiI+z4A8L3RleHQ+PC9zdmc+" alt="Pi.dev"></a> <a href="LICENSE"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="License"></a> <a href="https://discord.gg/pTHkG9Hew9"><img src="https://img.shields.io/badge/Discord-Join-5865F2?logo=discord&logoColor=white" alt="Discord"></a> <a href="https://x.com/leanctx"><img src="https://img.shields.io/badge/𝕏-Follow-000000?logo=x&logoColor=white" alt="X/Twitter"></a> <img src="https://img.shields.io/badge/Telemetry-Opt--in%20Only-brightgreen?logo=shield&logoColor=white" alt="Opt-in Telemetry"> </p> <p> <a href="https://leanctx.com">Website</a> · <a href="https://leanctx.com/docs/getting-started">Docs</a> · <a href="#get-started-60-seconds">Install</a> · <a href="#use-it-from-your-own-code-sdks">SDKs</a> · <a href="#real-world-scenarios">Scenarios</a> · <a href="#demo">Demo</a> · <a href="#benchmarks">Benchmarks</a> · <a href="cookbook/README.md">Cookbook</a> · <a href="SECURITY.md">Security</a> · <a href="CHANGELOG.md">Changelog</a> </p> </div>
项目信息
| 项目 | 信息 |
|---|---|
| Star 数 | 2,846 |
| Fork 数 | 278 |
| 编程语言 | Rust |
| 开源协议 | Apache-2.0 |
| 创建时间 | 2026-03-23 |
| 最近更新 | 2026-06-22 |
| 主题标签 | agentic-coding、ai、ai-agents、ai-coding、claude-code |
来源:[yvgude/lean-ctx](https://github.com/yvgude/lean-ctx)