Install Problem Benchmark Demo Architecture Performance How it works Features

slurp

Your codebase is the bowl. slurp serves exactly the noodles your LLM needs. 🍜

v1.0.0 — Production release

Understands your codebase architecture. 16 languages. Works with any codebase, any language.

$pip install slurp-graph

Quick install reference

Use case Command
Any project rec uv tool install slurp-graph
Python project with uv uv add slurp-graph
With pip pip install slurp-graph

Using a non-Python project (JS, Go, TypeScript...)? Use uv tool install or pip install — not uv add.

For slurp explain: set ANTHROPIC_API_KEY, OPENAI_API_KEY, run Ollama locally, or use any OpenAI-compatible endpoint. No LLM? Use --no-llm for structural analysis.

Your LLM doesn't need the whole bowl

slurp index maps your entire codebase into a knowledge graph using pure static analysis — no LLMs, no APIs. But injecting every node into every query is wasteful — your LLM spends most of its context budget on nodes it'll never use.

slurp scores each node against your query using PageRank + TF-IDF — zero LLM calls, zero extra tokens spent — and serves only what fits inside your budget.

69,418 full graph (tokens)
4,000 slurp budget (tokens)
94.2% saved

Benchmark: PrismaStats codebase · 2,111 nodes · "player stats" query

Real numbers on a real codebase

PrismaStats: 2,111 nodes, 69,418 tokens. No mocks.

Query Budget Tokens used Full graph Saved
"auth flow" 2,000 2,000 69,418 97.1%
"player stats" 4,000 4,000 69,418 94.2%
"database schema" 8,000 8,000 69,418 88.5%
Cost with slurp $0.13
Cost without slurp $1.87
Money saved $1.74 (93.3%)
93.3% mean savings
97.1% best case
0 extra LLM calls

Quality benchmark

more quality per token than full-graph injection
46.7% win rate vs full-graph baseline

Honest result: slurp excels at efficiency, not just token savings.

Call graph: Python, TypeScript/JS, Go, Java and Rust with cross-file resolution

PrismaStats: 193 → 488 call edges · createAdminClient: 0 → 97 callers

No external tools required

slurp index analyzes your codebase using pure static analysis — no LLMs, no external APIs, zero cost. 16 languages supported: Python, TypeScript/JavaScript, Java, Rust, C#, Ruby, PHP, Kotlin, Scala, Swift, C, C++, Go, Lua, Elixir, PowerShell.

Run it once and start querying immediately. No accounts, no API keys, no cloud.

# Index your project locally slurp index . # Output: 1473 nodes · 1443 edges · 30 files # Next: slurp 'your query' --graph graphify-out/graph.json

Install language extras: uv sync --extra java · uv sync --extra rust · uv sync --extra all-languages

See it in action

The interactive visualizer shows the subgraph slurp selected — and how much you saved.

Live demo — real PrismaStats codebase, real data. Orange = functions, Blue = classes, Purple = modules.

slurp — player stats calculation
50 nodes shown · 4,000 token budget · 96% saved Click any node to inspect · Drag to explore

slurp understands your code, not just your files

Call graph

5 languages with cross-file resolution. Return type propagation. 2,273 tests.

recalcularPlayerStats()
→ 4 callers detected
RISK: MEDIUM

slurp explain

Architectural role, risk percentage, explore further suggestions. Structural mode improved — no LLM needed.

slurp eval

Objective quality benchmark with LLM judge. 5× better quality per token proven on real projects.

MCP tools

5 tools: slurp_query, slurp_explain, slurp_impact, slurp_diff, slurp_suggest. Claude Code calls them automatically.

Built for speed.

Optimized at v0.7.0 — measured on a real 2,111-node codebase.

Optimization Before After Improvement
PageRank cache 8.32 ms 0.002 ms 4000×
Token count cache ~50 ms 0.174 ms 280×
Greedy heap (O(n log n)) 63.78 ms 10.69 ms
End-to-end latency 86.41 ms 10.69 ms 8.1×
Graph staleness silent auto-reload

Graph changes detected automatically — no server restart needed.

From zero to optimized in minutes.

0

New to slurp?optional

Run slurp init — detects your language, indexes your codebase, and configures the MCP server in one step.

# guided one-command setup slurp init
1

Install slurp

One command, no dependencies beyond Python.

# install pip install slurp-graph
2

Index your project locally

slurp index . analyzes your code with pure static analysis — no LLMs, no APIs, no cost.

# generates the graph locally slurp index . # Output: 1473 nodes · 1443 edges · 30 files

Keep the graph fresh: re-run slurp index . after big changes · slurp index . --watch for background auto-indexing · add as a GitHub Actions step for CI/CD.

Already indexed? Use slurp index . --smart to update only changed files.

Want to understand your codebase? slurp explain "functionName" explains any function in plain language.

Before editing a file, run slurp impact <file> to see what might break.

3

Configure MCP once, done forever

Add slurp to your .mcp.json. Claude Code calls it automatically on every query.

Global install:

{ "mcpServers": { "slurp": { "command": "slurp", "args": ["serve", "--graph", "graphify-out/graph.json"] } } }

Python project with uv:

{ "mcpServers": { "slurp": { "command": "uv", "args": ["run", "slurp", "serve", "--graph", "graphify-out/graph.json"] } } }
Fully automatic after step 3. Claude Code calls slurp on every query — no extra commands, no prompt engineering. You work exactly as before, just cheaper.

Already using graphify? slurp works with your existing graph.json out of the box.

Built different.

slurp explain

LLM-powered architecture explanations. What any function does, who calls it, and the risk of changing it. Works with Anthropic, OpenAI, Ollama, or any compatible endpoint.

slurp eval

Quality benchmark with LLM judge. Measures if slurp context improves response quality vs full graph injection. 5× better quality per token proven.

slurp index --smart

Git-aware incremental re-indexing. 21× faster on changed files.

slurp advisor

Recommends optimal token budget from your query history.

Multi-graph federation

Query multiple codebases simultaneously.

Call graph

Python, TypeScript/JS, Go, Java and Rust. Cross-file resolution for all five languages. Accurate blast radius analysis.

slurp impact

Pre-edit blast radius analysis. Know what breaks before you touch a file.

slurp suggest

Query recommendations from the graph frontier. Know what to explore next.

--viz

Interactive subgraph explorer

slurp diff

Compare graph snapshots

slurp benchmark

Measure token savings

--inject-code

Attach source code to nodes

Production ready.

slurp 1.0.0 ships with a complete call graph for Python, TypeScript/JS, Go, Java and Rust — with cross-file resolution for all five. slurp explain and slurp diff now tell the truth about your codebase.

2,273 tests
5 languages