Package Exports
- reponova
- reponova/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (reponova) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
reponova
⚠️ Alpha — Active Development This package is under active development. APIs, config format, and CLI may change between releases. It's already usable, but expect rough edges. If you find a bug or something doesn't work as expected, please open an issue — it helps a lot.
Knowledge graph builder & MCP server for AI code assistants. Builds a searchable, queryable graph of your codebase — then exposes it to AI agents via MCP tools.
What It Does
- Extracts symbols (functions, classes, modules, docs, diagrams) from your codebase using tree-sitter WASM parsers
- Builds a knowledge graph with cross-file and cross-repo relationships
- Detects communities (Louvain) and generates embeddings (TF-IDF or ONNX)
- Serves the graph over MCP — AI agents can search, trace impact, find paths, and explore architecture
Your Codebase reponova
┌──────────────────┐ ┌───────────────────────────────────┐
│ Python / TS / JS │ │ MCP Server (stdio) │
│ Markdown / Docs │ reponova │ ├─ graph_search (+BFS/DFS expand) │
│ Diagrams / SVG │ build │ ├─ graph_impact (blast radius) │
│ │ ────────────► │ ├─ graph_path (weighted Dijkstra) │
│ Multi-repo │ │ ├─ graph_explain (node detail) │
└──────────────────┘ │ ├─ graph_similar (semantic) │
│ ├─ graph_context (smart context) │
│ ├─ graph_ask (NL query) │
│ ├─ graph_community (membership) │
│ ├─ graph_hotspots (god nodes) │
│ ├─ graph_outline (tree-sitter) │
│ ├─ graph_docs (doc search) │
│ └─ graph_status │
└───────────────────────────────────┘Zero external runtime dependencies — no Python, no Docker, no database servers. Everything runs locally in Node.js.
Install
npm install -g reponova
# or run directly
npx reponovaRequires Node.js >= 18.
Quick Start
Install into your editor (registers MCP server, hook, skill, and config):
reponova install --target opencode # or: cursor, claude, vscode
Build the knowledge graph:
reponova build
The MCP server starts automatically with your editor. Use the graph tools directly from the AI assistant.
MCP Tools
| Tool | Description |
|---|---|
graph_search |
Text search across nodes. Supports type/repo filters and BFS/DFS context expansion. |
graph_impact |
BFS blast radius — find all upstream/downstream dependents of a symbol. |
graph_path |
Weighted shortest path (Dijkstra) between two symbols. Supports edge-type filters. |
graph_explain |
Full detail on a node: all edges, community membership, centrality metrics. |
graph_similar |
Semantic similarity search using TF-IDF or ONNX embeddings. |
graph_context |
Smart context builder with token budget — combines search, vectors, and graph expansion. |
graph_ask |
Natural language query — classifies intent and routes to the right tool. |
graph_community |
List all nodes belonging to a specific community, ranked by degree. |
graph_hotspots |
Most connected nodes (god nodes / architectural bottlenecks). Supports multiple metrics. |
graph_outline |
Tree-sitter code outline for any file: functions, classes, imports with signatures. |
graph_docs |
Search documentation nodes (markdown, text, rst). |
graph_status |
Graph metadata: node/edge counts, repos included, build timestamp. |
CLI Reference
install — Set up editor integration
reponova install --target <editor>| Option | Description |
|---|---|
--target |
Required. Editor to configure: opencode, cursor, claude, vscode |
--graph |
Path to reponova-out/ directory (default: ./reponova-out) |
What it does:
- Registers the MCP server in the editor's config
- Installs a hook/rule that reminds the AI agent to use graph tools
- Installs a skill file that teaches the AI agent how to use each tool
- Writes
reponova.ymlconfig inside the editor directory
| Target | MCP Config | Hook/Rule | Skill | Config |
|---|---|---|---|---|
| OpenCode | .opencode/opencode.json |
.opencode/plugins/reponova.js |
.opencode/skills/reponova/SKILL.md |
.opencode/reponova.yml |
| Cursor | .cursor/mcp.json |
.cursor/rules/reponova.mdc |
(embedded in rule) | .cursor/reponova.yml |
| Claude | claude mcp add (manual) |
.claude/settings.json |
.claude/skills/reponova/SKILL.md |
.claude/reponova.yml |
| VS Code | .vscode/mcp.json |
.github/copilot-instructions.md |
(embedded in instructions) | .vscode/reponova.yml |
build — Build the knowledge graph
reponova build [--config <path>] [--force]| Option | Description |
|---|---|
--config |
Path to reponova.yml (default: auto-detect from editor directories) |
--force |
Clean rebuild: deletes output directory and rebuilds from scratch |
The build pipeline:
- Detects source files, documentation, and diagrams
- Extracts symbols and relationships using tree-sitter WASM parsers
- Builds the knowledge graph with cross-file and cross-repo edges
- Detects communities (Louvain algorithm)
- Generates embeddings (TF-IDF by default, or ONNX MiniLM)
- Generates community summaries and node descriptions (algorithmic or LLM-enhanced)
- Generates
graph.htmlandgraph_communities.htmlinteractive visualizations - Generates the search index (
graph_search.db) - Generates code outlines and
report.md
mcp — Start the MCP server
reponova mcp [--graph <path>]| Option | Description |
|---|---|
--graph |
Path to reponova-out/ directory (default: auto-detect) |
Starts the MCP server over stdio. Normally launched automatically by the editor.
models — Manage local models
reponova models list # Show downloaded models
reponova models download # Download embedding/LLM models
reponova models remove <name> # Remove a downloaded modelcheck — Verify installation
reponova check [--graph <path>]Verifies the graph exists and reports basic stats.
Configuration
The install command writes reponova.yml into the editor directory. All paths are relative to the config file's location.
The config is auto-detected from these locations (in order):
- Explicit
--configargument reponova.ymlin the project root.opencode/reponova.yml,.cursor/reponova.yml,.claude/reponova.yml,.vscode/reponova.yml
Full config reference
# Where to write build output
output: ../reponova-out
# Repositories to include in the build
repos:
- name: api-service
path: ../services/api
- name: core-lib
path: ../services/core
# Build options
build:
mode: monorepo # "monorepo" or "separate"
exclude: [] # directory names to skip (e.g. dist_package, .tox)
incremental: true # use file hash cache for incremental rebuilds
html: true # generate interactive HTML visualizations
# html_min_degree: 3 # if set, only include nodes with degree >= this value in HTML
# Documentation extraction
docs:
enabled: true
patterns: # glob patterns to match
- "**/*.md"
- "**/*.txt"
- "**/*.rst"
exclude:
- "**/CHANGELOG.md"
- "**/node_modules/**"
max_file_size_kb: 500
# Diagram/image extraction
images:
enabled: true
patterns:
- "**/*.puml"
- "**/*.plantuml"
- "**/*.svg"
exclude:
- "**/node_modules/**"
parse_puml: true
parse_svg_text: true
# Embeddings: vector representations for semantic search
embeddings:
enabled: true
method: tfidf # "tfidf" (fast, default) or "onnx" (MiniLM, more accurate)
# Summaries: community summaries and node descriptions
summaries:
enabled: true
max_communities: 0 # 0 = no limit
generate_node_descriptions: true
node_description_threshold: 0.8 # top 20% nodes by degree
# LLM: local language model for enhanced summaries (optional, opt-in)
llm:
enabled: false # set true to use Qwen 0.5B for richer summaries
model: qwen2.5-0.5b-instruct
gpu: auto # "auto", "cpu", or "cuda"/"vulkan"/"metal"
# Outline generation (language auto-detected from file extension)
outlines:
enabled: true
paths:
- "src/**/*.py"
- "src/**/*.ts"
- "src/**/*.js"
exclude:
- "**/__pycache__/**"
- "**/node_modules/**"
- "**/dist/**"Programmatic API
import {
openDatabase,
initializeSchema,
populateDatabase,
loadGraphData,
searchNodes,
analyzeImpact,
findShortestPath,
getNodeDetail,
} from "reponova";
const graphData = loadGraphData("./reponova-out/graph.json");
const db = await openDatabase(":memory:");
initializeSchema(db);
populateDatabase(db, graphData);
const results = searchNodes(db, "authentication", { top_k: 5, type: "function" });
const impact = analyzeImpact(db, "Function:authenticate_user", { max_depth: 3 });License
MIT