graft is a CLI tool that builds a persistent, readable code-knowledge graph (markdown nodes plus a symbol wiring graph) for a codebase so coding agents avoid re-exploring the same code from zero each session. The graph is built with tree-sitter, needs no model or API key, and is refreshed automatically on every query.
Project overview
On SWE-bench Verified it was measured at 33/50 correctness versus 27/50 for Cold Claude Code without it, with 23% fewer tokens and 32% less wall-clock time in that comparison, and the structural graph costs $0 to keep fresh (~3ms check per query).
Project type
MCP · AI Agent · AI Coding
Use cases
Knowledge Q&A · Coding & Development
Deployment
Refer to project documentation
License
MIT
Best for
Developers and AI engineers who use coding agents and can run CLI/npm commands
Key capabilities
graft build uses tree-sitter to build a per-symbol code graph and per-file wiring cards deterministically, with no model or key needed.
Every query refreshes the graph against the working tree (~3ms structural check) so answers describe current code, including uncommitted edits.
Limitations and risks
Only 23 languages are indexed; files in unlisted languages are skipped.
Crux is per-symbol only in the code graph; inlining Crux into markdown nodes is not yet shipped.
Selecting the Codex (agents) host modifies the user-level ~/.codex/ config, which applies to every repository on the machine—check this scope before adopting in multi-repo environments.
Getting started
Install globally then initialize: npm install -g @nanonets/graft, followed by graft init. No model or API key is needed to build the structural graph.
Evidence and sources
GitHub project description: Turbocharge Claude Code, Cursor, Codex, Gemini & every coding agent: faster, cheaper, with contextual understanding specific to your codebase.
README: Every task, your coding agent starts blind. Before it changes anything, it re-explores the repo: grep a term, open a file, follow an import, back out, try again.
README: | Correctness | 54% | **66% (+12 pts)** |
README: Graft builds that understanding **once** and writes it into your repo as a folder of linked markdown files, one node per system, API, or concept.
README: npm install -g @nanonets/graft # install the CLI, once