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:
Productivity-boosting RAG engine for codebases with multi-provider AI support and semantic search.
2026-11-09
स्टार
—
टूल
—
अपटाइम
—
Layer
What it stores
Used for
Code Knowledge Graph
Classes, functions, imports, call edges (SQLite)
Symbol lookup, blast-radius analysis
Embeddings + FTS index
Semantic vectors + full-text search
Relevant code retrieval
Hierarchical Wiki
Plain-English .md files per module
AI explanations, chat context
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
deeprepo query "how does authentication work?"
deeprepo query "what breaks if I change auth.py?"
CLI Reference
deeprepo <command> [options]
Command
What it does
deeprepo init
Detect provider setup, print the ingest command
deeprepo ingest [PATH]
Scan repo → build graph + wiki + embeddings
deeprepo wiki [PATH]
Regenerate wiki pages only (skip re-indexing)
deeprepo serve
Launch wiki viewer + in-page chat at port 8080
deeprepo query "QUESTION"
Ask a question, get an AI answer
deeprepo status
Show branch isolation & cache freshness
Common flags (all commands)
--llm ollama|openai|anthropic|gemini|huggingface # LLM provider
--embed ollama|openai|huggingface # embedding provider (default: same as --llm)
--branch-isolation # enable per-branch databases
--base-branch main # seed feature-branch cache from main
--wiki-dir .deeprepo/wiki # override wiki output directory
ingest flags
--chunk-size N # chars per text chunk (default: 1000)
--overlap N # overlap between chunks (default: 100)
--workers N # wiki parallel workers (default: 3)
--no-wiki # skip wiki generation
serve flags
--port N # HTTP port (default: 8080)
Examples
# Ollama (free, fully local)
deeprepo ingest .
# OpenAI embeddings + Anthropic LLM
deeprepo ingest . --embed openai --llm anthropic
# Branch isolation for a feature branch
deeprepo ingest . --branch-isolation --base-branch main
# Serve wiki with chat on a custom port
deeprepo serve --llm openai --port 9000
# Query with specific top-k results
deeprepo query "where is AuthService defined?" --top-k 3
Python API
from deeprepo import DeepRepoClient
# Single provider (backward-compatible shorthand)
client = DeepRepoClient(provider_name="ollama")
# Split providers — Anthropic LLM + OpenAI embeddings
client = DeepRepoClient(
embedding_provider_name="openai",
llm_provider_name="anthropic",
)
# Branch isolation (team workflow)
client = DeepRepoClient(
provider_name="ollama",
branch_isolation=True,
base_branches=["main"],
)
# Ingest (incremental — unchanged files are skipped)
result = client.ingest("/path/to/your/code")
print(f"Files: {result['files_scanned']}, Wiki pages: {result['wiki_generated']}")
# Query — smart routing selects the cheapest context strategy
response = client.query("How does authentication work?")
print(response['answer'])
print(f"Intent: {response['intent']}, Strategy: {response['strategy']}")
print(f"Sources: {response['sources']}") # list of file paths
# Browse the generated wiki
print(f"Wiki at: {client.get_wiki_dir()}")
query() return shape
{
"answer": str, # LLM-generated answer
"sources": list[str], # file paths used as context
"intent": str, # navigate | impact | explain | debug | review | general
"strategy": str, # e.g. symbol_lookup, blast_radius, wiki_plus_skeleton, …
"retrieval": str, # embeddings | fts | graph
"token_estimate": int, # estimated tokens consumed
"history": list[dict], # conversation history (last N exchanges)
}
Supported AI Providers
Provider
Cost
Setup
Best For
Ollama
FREE, unlimited
Install app + ollama pull
Local dev, privacy, offline
OpenAI
Paid
OPENAI_API_KEY
Production, best quality
Anthropic
Paid
ANTHROPIC_API_KEY
Production, excellent reasoning
Gemini
Free tier
GEMINI_API_KEY
Experimentation
HuggingFace
Free tier
HUGGINGFACE_API_KEY
Cloud embeddings, no GPU needed
Note: Anthropic has no embeddings API. Pair it with another provider:
Add this to your project's CLAUDE.md so Claude automatically uses DeepRepo:
## Code navigation
Before reading any source file directly, use these MCP tools:
- `find_symbol(name)` to locate a class or function
- `get_file_structure(filepath)` to see a file's API without reading it
- `explain_file(filepath)` to understand what a file does
- `find_change_impact(filepath)` before editing any file
- `ask_codebase(question)` for open-ended questions
- `get_project_overview()` at the start of a new session
Only call Read/Grep on a file after the above tools have been tried.
Configuration
Environment Variables
Variable
Default
Description
LLM_PROVIDER
openai
LLM provider name
EMBEDDING_PROVIDER
same as LLM_PROVIDER
Embedding provider name
OPENAI_API_KEY
—
Required for OpenAI
ANTHROPIC_API_KEY
—
Required for Anthropic
GEMINI_API_KEY
—
Required for Gemini
HUGGINGFACE_API_KEY / HF_TOKEN
—
Required for HuggingFace
OLLAMA_MODEL
llama3.1:8b
Ollama LLM model name
OLLAMA_EMBED_MODEL
nomic-embed-text
Ollama embedding model
OLLAMA_BASE_URL
http://localhost:11434
Ollama server URL
OLLAMA_TIMEOUT
300
LLM response timeout (seconds)
Testing
# Full end-to-end test suite (runs ingest + all checks)
python3 test_deeprepo_flow.py
# Skip ingest, use cached index (faster iteration)
python3 test_deeprepo_flow.py --skip-ingest
# pytest unit tests
pytest tests/unit/ -v
# pytest with coverage
pytest tests/unit/ --cov=deeprepo --cov-report=html
The test_deeprepo_flow.py script tests all 7 sections end-to-end:
अभी टूल सूची नहीं है। रिमोट सर्वर को पहले हेल्थ चेक के बाद सूची मिलती है।
FAQ
सवाल
Deeprepo कैसे इंस्टॉल करें?
इस पेज पर Cursor, Claude Desktop, Claude Code या VS Code के लिए stdio कॉन्फ़िग कॉपी करें। यह पब्लिशर का इंस्टॉल इस्तेमाल करता है, PlugMCP प्रॉक्सी नहीं।
क्या Deeprepo के लिए API key चाहिए?
इस रिकॉर्ड में कोई ज़रूरी एनवायरनमेंट वेरिएबल दर्ज नहीं है।
Deeprepo कौन सा ट्रांसपोर्ट इस्तेमाल करता है?
Deeprepo stdio पर लोकल चलता है।
Deeprepo की पिछली जाँच कब हुई थी?
पिछली जाँच 2026-11-09 को हुई। Productivity-boosting RAG engine for codebases with multi-provider AI support and semantic search.