Graft

The open-source context layer for large codebases.

Up to 4× cheaper and 3× faster.

Star on GitHub
No vector embeddingsRuns 100% localNo telemetry
apiauthdbcachesearchpaymentsqueuemailerconfigtestseventswebhooks

Use Fable 5 without worrying about limits.

Quick start

Two commands, then nothing to run.

Run graft init once. Graft rides along in every session and keeps the map in sync on its own.

shop · zsh
$npm install -g @nanonets/graft
$graft init
built the graph · wired into Claude Code
$claude
Claude Code
Welcome back
Fable 5 (1M context)
~/graft
Graft is active
Pulls the right nodes into each prompt.
Try "where does capture happen?"
graft · 402 nodes / 977 edges · 79% enriched · ✓ synced

Works with

After setup

Here's what changes.

Every session

Reads the map first — no grepping from zero.

Every edit

Rebuilds in the background. Nothing to run.

Every task

Knows the blast radius before it opens a file.

A map up front beats grepping from cold.

cold startgraph first
Latency
39.8s
15.8s
−60%
Tool calls
4.2
2.3
−46%
Input tokens
8,070
4,650
−42%
Cost / task
$0.043
$0.029
−32%

Correctness +5 points— a separate model grades every answer, so speed can't fake being right.

Same agent, same tasks, cold vs. graph-first — 162 runs across two repos. Reproduce with npm run bench. On SWE-bench (provisional), graft reproduced all five merged PRs for 21% less.

Tree-sitter parsing

Real ASTs across 20+ languages. Deterministic, no key.

MCP server & CLI

Six MCP tools or the CLI. Any agent, a handful of calls.

Impact analysis

Any symbol's full blast radius, before you change a line.

Without a map, your agent reads 30 files just to change 3.

One graft build turns 247 files into 12 plain-English nodes.

Every link is a verb from your code: uses, produces, validates.

Pick a node and see its blast radius.

what it depends on what depends on it

It's just files your agent reads. No server, no database, no embeddings.

$ npm install -g @nanonets/graft
no map · 0/30 files opened · 0 changed
usesusesusesusesusesusesusesusesusesproducesproducesusesusesconfiguresconfiguresconfiguresvalidatesvalidatesvalidatesapiauthdbcachesearchpaymentsqueuemailerconfigtestseventswebhooks
Scroll

Two minutes to a mapped repo

Onboard your agents once, not every session.

$ npm install -g @nanonets/graft
Star on GitHub

Claude Code · Codex · Cursor · Kiro · any agent that reads files