一站式服务——本地优先的RAG协议栈,支持智能多语代码/文档、远程代码执行、本地llama丰富、渐进披露工具、MCP服务器、沙箱安全。
概览
通过本地RAG、智能路由和集装箱化安全,实现70%-95%的成本降低。 LLMC 是一款智能路由器,旨在大幅降低在代码库中使用大型语言模型的成本。 LLMC 不会把整个代码库发送给 Claude 或 GPT-4,而是在本地索引你的代码,找到准确的相关片段(函数、类、文档),然后发送 。 * 存储无外部依赖的文本+元数据。* 缓存嵌入,避免重新计算未更改的文件。* 将最相关的跨度压缩到固定的令牌预算中。* 使用小型本地模型标记和总结代码,以便更好地检索。 * 可信客户端可直接获得主机访问(比 Docker 开销低 76%)。* 不受信任的输入运行在 Docker/nsjail 中。* 即使 LLM 通过提示注入“越狱”,也无法逃出容器。 * 来自本地→廉价云→高级模型的级联。* 硬性预算上限以防止意外账单。* API 提供者自动令牌桶限流。
概述(AI 翻译)
停止在LLM代币上烧钱。
通过本地RAG、智能路由和集装箱化安全,实现70%-95%的成本降低。
⚡ 什么是LLMC?
LLMC 是一个本地优先的 RAG(检索增强生成)引擎和智能路由器,旨在大幅降低使用大型语言模型与代码库的成本。
LLMC不会把整个代码库发送给Claude或GPT-4,而是在本地索引你的代码,找到准确相关的片段(函数、类、文档),只发送重要的内容。
🚀 快速启动
几秒钟内就能启动。
1.安装
2.索引你的代码
3.省钱
✨ 主要特色
| 特色 | 描述 |
|---|---|
| ** 💸 大幅节省**通过仅发送相关上下文,使代币使用率降低70-95%。 | |
| ** 🔒 安全优先** | ** v0.7.0 新增内容:** “混合模式”用于可信客户端(主机访问)与容器隔离(针对不可信任的大型语言模型)。 |
| ** 🧠 多语种 RAG** | 智能解析(TreeSitter),适用于 Python、TS、JS、Go、Java 及技术文档。 |
| ** 🕸️ GraphRAG** | 能够理解你的代码结构(导入、调用、继承),从而自动查找相关文件。 |
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
⚡ What is LLMC?
LLMC is a local-first RAG (Retrieval Augmented Generation) engine and intelligent router designed to drastically reduce the cost of using Large Language Models with your codebase.
Instead of sending your entire codebase to Claude or GPT-4, LLMC indexes your code locally, finds the exact relevant snippets (functions, classes, docs), and sends only what matters.
graph LR
A[User Query] --> B(LLMC Router);
B --> C{Local Index};
C -->|Search| D[Relevant Context];
D -->|Trim & Pack| E[Optimized Prompt];
E --> F[LLM API];
F --> G[Answer];
style B fill:#f9f,stroke:#333,stroke-width:2px
style E fill:#bfb,stroke:#333,stroke-width:2px
🚀 Quick Start
Get up and running in seconds.
1. Install
# One-line install
curl -sSL https://raw.githubusercontent.com/vmlinuzx/llmc/main/install.sh | bash
# Or via pip
pip install "git+https://github.com/vmlinuzx/llmc.git#egg=llmcwrapper[rag,tui,agent]"
2. Index Your Code
cd /path/to/your/project
llmc-cli repo register .
3. Save Money
# Search without using ANY tokens
llmc-cli search "authentication middleware"
# Launch the visual dashboard
llmc-cli tui
✨ Key Features
| Feature | Description |
|---|---|
| 💸 Massive Savings | Reduces token usage by 70-95% by sending only relevant context. |
| 🔒 Security First | New in v0.7.0: “Hybrid Mode” for trusted clients (host access) vs. Container Isolation for untrusted LLMs. |
| 🧠 Polyglot RAG | Smart parsing (TreeSitter) for Python, TS, JS, Go, Java, and technical docs. |
| 🕸️ GraphRAG | Understands your code structure (imports, calls, inheritance) to find related files automatically. |
| 🖥️ TUI Dashboard | Terminal UI to monitor indexing, search results, and costs. ⚠️ Work in progress — expect rough edges. |
| 🔌 MCP Support | Full Model Context Protocol server to integrate seamlessly with Claude Desktop. |
🔍 Deep Dive
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →