Overview
Walks a project directory and extracts a knowledge graph using tree-sitter AST analysis — no LLM required. Nodes represent structural units (files, functions, classes, methods); edges represent relationships (contains, calls, imports, inherits). The graph is persisted asgraph.json alongside the vector index and is used by search_graph and graph_neighbors. It is also blended into results by hybrid_search when present.
Parameters
Example
Node kinds
Edge kinds
Notes
- Graph is stored at
~/.vecgrep/<project_hash>/graph.json - Independent of the vector index — can be run before or after
index_codebase - Runs entirely locally — no network calls, no LLM
hybrid_searchdegrades gracefully to pure vector search if no graph index exists- Use
force=Trueafter significant refactors to rebuild from scratch
