Skip to main content

GraphRAG knowledge base for codebases

Project description

nelgraph 🚀

An autonomous, zero-configuration Knowledge Graph builder and semantic search engine optimized for local codebases and AI testing agents. It ingests source code, AST Call Graphs, and Git history into a hybrid Graph-Vector database (Neo4j + ChromaDB) using DeepSeek V4-Flash.

🛠️ Installation

pip install nelgraph

🚀 CLI Usage

1. Initialize GraphRAG for your project

Navigate to your project directory and run:

nelgraph init

During initialization, it will prompt you for your OpenRouter API key, configure the local .env and .graphrag_data/ directory, start Neo4j inside a local Docker container, build structural nodes and indexes, and automatically install a git post-commit hook so the graph auto-syncs.

2. Manual Synchronization

If you want to manually trigger incremental synchronization:

nelgraph sync

3. Check Status

View current database metrics, indexed function counts, and enrichment coverage:

nelgraph status

4. Run Watcher

Run a file watcher that auto-syncs the graph in the background when files change:

nelgraph watch

🔌 Programmatic Python API

You can import nelgraph directly into your scripts or AI testing agents:

import nelgraph

# Configure (if .env is not present or needs custom config)
nelgraph.configure(
    codebase_path="/absolute/path/to/project",
    openrouter_api_key="your-openrouter-key"
)

# 1. Get snapshot of prioritized functions
snapshot = nelgraph.get_snapshot()
print(f"Total functions: {snapshot['total']}")

# 2. Retrieve detailed context for a function
ctx = nelgraph.get_function_context("process_order")
print(ctx.get("function", {}).get("raw_code"))

# 3. Mark function as tested/verified
nelgraph.mark_tested("process_order")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nelgraph-1.0.1.tar.gz (44.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nelgraph-1.0.1-py3-none-any.whl (58.9 kB view details)

Uploaded Python 3

File details

Details for the file nelgraph-1.0.1.tar.gz.

File metadata

  • Download URL: nelgraph-1.0.1.tar.gz
  • Upload date:
  • Size: 44.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for nelgraph-1.0.1.tar.gz
Algorithm Hash digest
SHA256 6ac934ee2fe6dd47a45ff983bd6c43bcd7f5b2a221364c24e216d825dc923b5e
MD5 b508cd5cee6b27b6c74184fa2b297b21
BLAKE2b-256 8b4d13b07836ba334e4164660e7fa1790795b17ae513b9b63a12744c034d78bf

See more details on using hashes here.

File details

Details for the file nelgraph-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: nelgraph-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 58.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for nelgraph-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 62f31e98aebc279f7003b2bc47bddc538f062760dd332f1d6b043196b6ee59d9
MD5 8daa2a472918b75cd1c9418ee5e2ab85
BLAKE2b-256 ad7fd4437dcb27dce30195aa421a31c8036e74a6aafa61634200b9a2b44e3e00

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page