
Deeprepo
io.github.abhishek2432001由 GitHub 帳號 abhishek2432001 發布v1.0.0更新於 Oct 24, 2026
Productivity-boosting RAG engine for codebases with multi-provider AI support and semantic search.
概覽
本機 RAG 引擎,為程式碼庫建立索引,讓 AI 助理查找符號、解釋檔案、評估變更影響並回答程式碼問題。
- 可以做什麼
- 索引程式碼庫目錄,在本機 SQLite 檔案中建立程式碼圖譜、向量嵌入與產生的 wiki,並只對變更的檔案做增量重新處理。查找類別或函式定義位置,列出檔案的結構或 API。解釋檔案的作用,並評估修改該檔案會影響哪些部分。回答關於程式碼庫的開放式問題並提供專案概覽,同時回傳作為依據的來源檔案路徑。
- 適用情境
- 適合助理在本機程式碼庫上工作、希望取得比直接讀取原始檔案更省 token 且更有針對性的上下文時使用,尤其適用於符號查找、檔案解釋以及編輯前的變更影響檢查。適用於桌面端的 Cursor、Claude Desktop 或其他 MCP 用戶端。
- 執行需求
- 以本機 Python 程序執行,需安裝帶 mcp 附加項目的 deeprepo 套件,僅支援桌面端。需要 AI 提供者:本機執行的 Ollama(建議,免費),或透過 LLM_PROVIDER 與 EMBEDDING_PROVIDER 設定的雲端服務,並需要 OPENAI_API_KEY、ANTHROPIC_API_KEY、GEMINI_API_KEY 或 HUGGINGFACE_API_KEY/HF_TOKEN 等金鑰。程式碼庫需先完成索引。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Deeprepo,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
DeepRepo — Local RAG Engine for Codebases
A production-grade Python library for performing RAG (Retrieval Augmented Generation) on local codebases. No heavy frameworks, no external vector DBs, no cloud required.
What It Does
DeepRepo ingests a codebase and builds three things simultaneously:
A smart query router classifies every question and picks the cheapest context strategy, reducing LLM token usage by 5–50x compared to naive RAG.
Features
- Zero dependencies on heavy frameworks — pure Python, SQLite-backed
- Multiple AI providers — Ollama (free/local), OpenAI, Anthropic, Gemini, HuggingFace
- CLI-first —
deeprepo ingest ./deeprepo serve/deeprepo query "…" - Wiki viewer — browsable, searchable HTML wiki with in-page chat (
deeprepo serve) - 7 focused MCP tools — drop DeepRepo into Cursor / Claude Desktop as an MCP server
- Branch isolation — per-branch SQLite databases with copy-on-write from base branches
- 3-tier retrieval — Embeddings → FTS → Graph fallback for resilient search
- Incremental ingestion — unchanged files are skipped; only deltas re-processed
Quick Start
1. Install
For MCP server support:
2. Install Ollama (free, local — recommended)
3. Ingest your codebase
4. Browse the wiki
5. Ask questions
CLI Reference
Common flags (all commands)
ingest flags
serve flags
Examples
Python API
query() return shape
Supported AI Providers
Note: Anthropic has no embeddings API. Pair it with another provider:
Architecture
Storage
Everything lives in a single SQLite file per branch — no Redis, no Postgres, no Chroma.
Design Patterns
- Facade —
DeepRepoClientis the single entry point; internals are hidden - Strategy —
LLMProvider/EmbeddingProviderabstract interfaces; providers are swappable - Registry —
@register_llm("ollama")decorator auto-registers providers at import time - Bottom-up synthesis — wiki pages generated leaves-first; parent pages consume child summaries
- 3-tier fallback — Embeddings → FTS → Graph; queries work even when embeddings are cold
- Copy-on-write branching — feature branches start from base-branch cache, then delta-update
MCP Server (AI Assistant Integration)
Connect DeepRepo as an MCP server so Cursor, Claude Desktop, or any MCP-compatible AI assistant can call it directly — without ever reading raw files.
Setup
Cursor — create ~/.cursor/mcp.json:
Claude Desktop — add to ~/Library/Application Support/Claude/claude_desktop_config.json:
Available MCP Tools (7 tools)
Token Reduction vs Naive RAG
CLAUDE.md tip
Add this to your project's CLAUDE.md so Claude automatically uses DeepRepo:
Configuration
Environment Variables
Testing
The test_deeprepo_flow.py script tests all 7 sections end-to-end:
- Client initialisation & branch flags
- Ingest (graph + embeddings + wiki)
- WikiEngine — page generation, caching, repo overview
- Graph API — skeleton, blast-radius, symbol lookup
- RAG / Router — intent classification, query execution
- CLI commands — all subcommands + help
- Branch isolation flag combinations
Adding a New Provider
- Create
src/deeprepo/providers/myprovider.py - Implement
EmbeddingProviderand/orLLMProviderinterfaces - Decorate with
@register_embedding("myprovider")/@register_llm("myprovider") - Auto-discovered at import time — no other changes needed
Documentation
- DEVELOPER_WORKFLOW_GUIDE.md — daily dev workflows and automation recipes
- deeprepo_core/README.md — package README (PyPI)
- docs/high-level-design.excalidraw — process flow diagram
- docs/class-interaction-design.excalidraw — class diagram
License
MIT License — see LICENSE file for details.
Built for developers who want full control over their RAG pipelines.
來源:README.md,提交 1dcac5d
工具
0版本歷史
1- v1.0.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分