nogrep

nogrep — code context for AI agents, without the grep-and-read loop.

An agent working from grep has to read whole files to find anything. A typical multi-step bug fix costs about 220,000 input tokens this way, most of them spent on code that turns out to be irrelevant.

nogrep parses the repository into a graph — every function, call, import, and inheritance edge, via tree-sitter, across 8 languages — and answers structural questions directly: who calls this, what breaks if it changes, which 8,000 tokens of code actually matter for this issue. The same bug fix costs about 14,000 tokens.

Relevance is computed by personalized PageRank diffusion from the issue text over typed edges, so it surfaces code with zero keyword overlap with the query — the middleware that calls session.validate(), the model that inherits from SessionMixin. Keyword search cannot find these. The graph walks straight to them.

Benchmarks

SWE-bench Verified, 150 tasks across 12 repositories. File recall at a fixed token budget, against the strongest text baseline:

budgetBM25nogrep
2K tokens0.2650.674nogrep at 2K beats BM25 at 8K by 21 points
4K tokens0.3550.667(50-task budget sweep)
8K tokens0.4640.705p < 0.0001, Wilcoxon signed-rank

Structural queries (callers, dead code, module maps) replace whole-file reads outright: ~270 tokens per answer where grep-and-read averages ~84,000.

Tools

Fourteen MCP tools. The agent picks them itself; you just ask questions.

nogrep_get_context
Issue text in, the relevant slice of the codebase out, within a token budget.
nogrep_callers / nogrep_callees
Who calls this function; what it calls.
nogrep_impact
Blast radius — every transitive dependent of a change.
nogrep_trace
Shortest call chain between two functions.
nogrep_dead_code / nogrep_cycles / nogrep_hotspots
Unreachable functions, circular dependencies, load-bearing bridge points.
nogrep_search / nogrep_module / nogrep_communities / nogrep_health / nogrep_quality / nogrep_index
Symbol search ranked by PageRank, per-file maps, detected module structure, graph stats, ten structural quality signals, and the indexer that builds it all.

In a session

# inside a Claude Code session, after indexing:

> Show me everything that calls validate_session.
> What is the blast radius if I change it?
> Any circular dependencies in the auth module?
> The login flow breaks after a password reset —
  find the relevant code.

The last one is the point. The answer includes files that share no words with the question, found through the call graph, inside an 8K-token budget. The agent never opens the other 47 files.

Install

curl -fsSL https://nogrep.com/install.sh | sh

Needs the Rust toolchain. The installer fetches the source from this site, builds the nogrep CLI and nogrep-mcp server with cargo (a minute or two), and registers the MCP server with Claude Code if the claude CLI is present. One Rust binary, no runtime dependencies; works with Claude Code, Cursor, Windsurf, and anything else that speaks MCP. Apache-2.0.