Overview
Walks a project directory, extracts semantic code chunks using AST analysis, embeds them locally, and stores them in a vector index. Subsequent calls skip unchanged files (incremental updates).Parameters
Example
Provider lock
Once a project is indexed with a provider, re-indexing with a different provider requiresforce=True. This rebuilds the vector table with the correct embedding dimensions for the new provider.
Live watch
watch=True starts a background watcher that detects file saves and re-indexes only changed files automatically. Only supported with the local provider — using watch=True with a cloud provider returns an error to prevent unbounded API costs.
stop_watching to stop the watcher.
Notes
- Only re-indexes files whose mtime or size has changed since the last run
- Index is stored under
~/.vecgrep/<sha256-of-project-path>/lancedb/with amerkle.jsonfingerprint file - To also build the knowledge graph (for
search_graph,graph_neighbors,hybrid_search), runindex_graphafter indexing
