Skip to content

Repopedia

MIT-licensed code knowledge graph: index any source repo into a queryable graph of symbols, call chains and blast radius — with wiki generation. Code is a graph; treat it like one.

Install

$claude mcp add repopedia -- repopedia mcp --repo /path/to/repo

Install command taken from the project's README or registry entry. Always review code before running it.

repopedia

中文文档 · Gallery · Agent Skill

Code is a graph — calls, dependencies, inheritance — but today's AI doc tools pretend it's text. repopedia recovers the structure first (AST → knowledge graph), then grows answers, wikis, and impact analysis from the graph. The graph says what's true (every claim cites file:line); the LLM makes it readable.

repopedia is MIT-licensed, local-first, and dependency-light: pip install and index any repo. No Docker, no server, no vendor lock-in.

It is deliberately the minimal version of this idea: one SQLite file, zero config — the smallest tool that answers "who calls this" and "what breaks if I change this" for your coding agent.

The diagram above was generated by repopedia itself: repopedia wiki on this repo, rendered from the module-dependency Mermaid it produced. Dogfooding from day one.

Why a graph, not chunks

Naive code understanding chunks source files, embeds them, and retrieves the top-k chunks most similar to a question. That works for "where is the retry logic?" — the answer sits in one chunk. It breaks on structural questions like:

If I change Engine.run, what breaks?

No single chunk contains the answer. You need the call graph: who calls run, who calls them, and so on. Vector similarity can't do graph traversal; a knowledge graph can. repopedia builds that graph with tree-sitter (precise, language-aware parsing — not regexes), then answers from it.

Architecture

flowchart LR
    A[Source repo.py / .ts / .tsx] --> B[tree-sitterextractors]
    B --> C[FileFactssymbols · calls · imports · inherits]
    C --> D[indexercross-file resolution]
    D --> E[(SQLite graphnodes + edges)]
    E --> F[queriesblast radius · incremental]
    E --> G[MCP server7 tools]
    E --> H[wiki generatorpages + diagrams from graph]

Querying the graph

cd ./myrepo
repopedia query callers pkg.mod.Service.run     # who calls it (file:line)
repopedia query callees pkg.mod.Service.run     # what it calls (unresolved shown as <unresolved: raw>)
repopedia query inherits pkg.mod.Service        # base classes, nearest first
repopedia query file pkg/mod.py                 # symbols defined in a file
repopedia blast-radius pkg.mod.Service.run --depth 3
repopedia search "retry handler"                 # BM25 + one graph hop

blast-radius answers "if I change this, what breaks?": transitive reverse calls traversal up to --depth, plus every file that imports the symbol's file. Each hit cites file:line and how it was reached (calls(2), imports…). Add --json to any command for machine-readable output — the same functions back the Week 3 MCP server.

Python API (all returns are plain JSON-serializable dicts/lists):

from repopedia.store import open_store
from repopedia import query

with open_store("myrepo/.repopedia/graph.db") as s:
    for hit in query.blast_radius(s, "pkg.mod.Service.run", depth=3):
        print(hit["depth"], hit["via"], hit["qualified_name"],
              f"{hit['file']}:{hit['line_start']}")

Incremental updates

repopedia update ./myrepo
# updated: +1 added, ~2 modified, -0 deleted

Similar plugs

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

Java 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io