Before BugViper can review pull requests or answer questions about your codebase, it needs to index the repository. Indexing clones the repository, parses every source file using Tree-sitter, and writes the result into a Neo4j knowledge graph. Once indexed, BugViper can search your code in milliseconds, trace call chains, detect security issues in PRs, and answer natural-language questions about your entire codebase.Documentation Index
Fetch the complete documentation index at: https://personal-ce79cb71.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
What happens during ingestion
When you submit a repository for indexing, BugViper runs the following pipeline:- Clone — BugViper downloads the repository from GitHub at the specified branch.
- Parse — Tree-sitter parsers run against all recognized source files. BugViper supports 17 languages out of the box.
- Graph write — The parser extracts
Function,Class,Variable,File,Module, andRepositorynodes and writes them to Neo4j along with relationships (CONTAINS,DEFINES,CALLS,IMPORTS,INHERITS). Cyclomatic complexity is calculated and stored on everyFunctionnode at this stage. - Embed (optional) — If an OpenRouter API key is configured, BugViper batch-embeds all nodes using
text-embedding-3-smalland stores 1536-dimension vectors in Neo4j vector indexes for semantic search.
Ingest a repository via the API
Send aPOST request to /api/v1/ingest/github with the repository details. All API requests require a Firebase ID token in the Authorization header.
If an ingestion job is already running for the same repository, BugViper returns the existing job’s ID and status instead of starting a duplicate. Jobs that have been stuck in
pending or dispatched for more than 10 minutes are automatically marked as failed so you can resubmit.Poll for ingestion progress
Ingestion runs in the background. Poll the job endpoint with thejob_id from the previous response to check progress:
status field moves through the following states:
| Status | Meaning |
|---|---|
pending | Job is queued and waiting to start. |
running | Ingestion is actively processing the repository. |
completed | Ingestion finished successfully. |
failed | Ingestion encountered an unrecoverable error. Check error_message. |
Ingestion stats
When a job completes, thestats object is populated with a summary of everything BugViper found in the repository:
| Field | Description |
|---|---|
files_processed | Source files successfully parsed and written to the graph. |
files_skipped | Files ignored because their language is unsupported or they exceeded size limits. |
classes_found | Total Class nodes created across all processed files. |
functions_found | Total Function nodes created, including class methods. |
imports_found | Total Module import relationships recorded. |
total_lines | Aggregate line count across all processed files. |
embedding_status | completed if vectors were generated, skipped if embedding was not run, or failed if it errored. |
nodes_embedded | Number of nodes that received vector embeddings. |