A codebase brain for AI coding assistants — pre-indexed navigation, blast radius, dead code detection
Project description
nervx
A codebase brain for AI coding assistants. Pre-indexed navigation, blast radius analysis, dead code detection, and architectural pattern recognition — all from a single pip install.
Install
pip install nervx
Quick Start
# Build the brain for your project
nervx build .
# Ask questions in natural language
nervx nav "how does authentication work"
# Check blast radius before refactoring
nervx blast-radius "src/auth.py::validate_token"
# Find dead code
nervx find --dead
# Find untested critical code
nervx find --no-tests --importance-gt 20
# Open interactive visualization
nervx viz .
What It Does
nervx parses your codebase with tree-sitter, builds a graph of every function, class, and method, then pre-computes:
- Edges: who calls what, who imports what, who inherits from what
- Importance scores: based on caller count, cross-module usage, and connectivity
- Architectural patterns: factories, singletons, event buses, strategy patterns, repositories
- Concept paths: end-to-end call chains and domain clusters
- Git intelligence: hotspots, temporal coupling, churn analysis
- Contract analysis: callers that disagree on error handling
- Dead code: unreferenced functions and classes
All stored in a single SQLite database (.nervx/brain.db), queryable in milliseconds.
Commands
| Command | What it does |
|---|---|
nervx build <path> |
Full build of the brain |
nervx update <path> |
Incremental update (only changed files) |
nervx nav "<question>" |
Natural language navigation with execution flows |
nervx blast-radius "<symbol>" |
Impact analysis for refactoring |
nervx find --dead |
Find unreferenced symbols |
nervx find --no-tests |
Find untested code |
nervx flows [keyword] |
Show execution paths |
nervx diff --days 7 |
Recent structural changes |
nervx viz . |
Interactive D3 visualization |
nervx stats |
Graph statistics |
Claude Code Integration
When you run nervx build, it automatically adds instructions to your project's CLAUDE.md that teach Claude Code to use nervx commands. Claude will use nervx nav before exploring code, check blast radius before refactoring, and find dead code before cleanup — saving tokens and tool calls.
Supported Languages
Python, JavaScript/TypeScript, Java, Go, Rust, C/C++, C#, Ruby
Watch Mode (Optional)
pip install nervx[watch]
nervx watch .
Auto-updates the brain when files change.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nervx-0.1.0.tar.gz.
File metadata
- Download URL: nervx-0.1.0.tar.gz
- Upload date:
- Size: 118.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb83e158da63f2e12c89357e405e5906643f249271ab24d615ee455d4f58f63c
|
|
| MD5 |
a05c81fc6bc2efc568549529968fd59c
|
|
| BLAKE2b-256 |
436f683f68b2b82ac802dea3b188032c98a8771926cc0e173f38f5e5540d5cde
|
File details
Details for the file nervx-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nervx-0.1.0-py3-none-any.whl
- Upload date:
- Size: 119.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a0d93e6f1683ed6210e968c40da21e2c643e855721958b75ba5b6375a69ee01
|
|
| MD5 |
de19d76e7bacdc10ff57e32e4d12755a
|
|
| BLAKE2b-256 |
567ae4ef5e18bbda5c17640dea5929d70868fc8d3caaba4ff8d4e8d82538c789
|