AgentIndex icon
AgentIndex
ToolsMCP ServersHOTCategoriesTrendingNewBest ListsCompareGuides
Submit Tool
ToolsMCP ServersHOTCategoriesTrendingNewBest ListsCompareGuides
Home/
Code Assistant/
Graft
Graft logo

Graft

Active·★ 10.8k·MIT·Updated 2026-10-27
★ Most Popular★ Essential★ Trending

Graft targets a specific waste in coding agents: every task they start blind, re-exploring the repo with grep, file opens and import-following, then discarding what they learned when the session ends. Graft builds that understanding once and writes it into your repository as a folder of linked markdown files, one node per system, API or concept, each explained in plain language rather than as a bare list of symbols.

There are no embeddings or similarity index: the graph is plain files the agent opens and greps. It is a local cache that `graft build` adds to .gitignore, and every query first rebuilds the structural graph against the working tree, which the README says costs nothing and takes about 3 ms when nothing changed. Summaries are written by a provider and key of your choice (OpenAI, Anthropic, OpenRouter, Fireworks, Groq, a LiteLLM proxy or a local model). Setup is `npm install -g @nanonets/graft` then `graft init`, which asks which agents to wire up (Claude Code, Cursor, Codex, Gemini and others), with `--dry-run` to preview every file it would touch. There is an MCP server, a CLI with grep and map commands, a graph visualiser and an optional GitHub App for blast-radius review of pull requests. The code is MIT licensed.

This write-up is based on the project's README and public repository data. We have not hand-tested the tool. Data as of 2026-10-24.

License
MIT
Latest release
No GitHub releases
Last commit
2026-10-24
Contributors
47
Forks
952
Open issues and PRs
244
First published
2026-07-03

Source: GitHub, npm and PyPI public APIs.

#ai-agents#anthropic#claude-code#cli#code-graph#codex#context-engineering#cursor
$ Install
$ npm install -g @nanonets/graft && graft init
↗ Visit site★ GitHub
01

Features

01Generates a human-readable, linked markdown graph of the codebase for contextual understanding.
02Provides real explanations of system parts and their connections, bypassing redundant agent exploration.
03Automatically refreshes the code graph against the working tree for real-time accuracy, even with uncommitted edits.
04Supports multiple LLM providers for generating summaries, allowing users to use their preferred models and keys.
05Acts as a local, regenerable cache (`graft/` folder) that is not committed to version control.
02

Why choose it

+Turns a repo into a graph of linked markdown notes the agent can read and grep, with no embeddings or index to keep warm.
+Rebuilds the structural graph against the working tree on every query, so it reflects uncommitted edits.
+Bring your own summariser: OpenAI, Anthropic, OpenRouter, Groq, a LiteLLM proxy or a local model.
+`graft init --dry-run` shows every file it would write before anything changes, and works with Claude Code, Cursor, Codex and Gemini.
03

Trade-offs

!The headline numbers (such as 42% fewer tokens and 60% less time) come from the project's own benchmark of 162 runs on two repositories, not an independent evaluation.
!Writing the node explanations needs an LLM provider and key, which adds a cost the first time the graph is built.
!The generated graph is a local cache you must rebuild or share through the wiring it adds, rather than something committed to the repo.
05

Maintenance check

ActiveChecked: 2026-10-25
Last commit
2026-10-24
Commits, last 90 days
100+
Releases, last 90 days
0
Latest release
—
Open issues
249
Recent issues with at least one comment
0/11
Commits per week, last 12 weeks
Commits per week, last 12 weeks: 38, 20, 63, 29, 14, 5, 9, 20, 0, 14, 105, 0

Oldest week on the left; the latest four weeks are orange. Source: GitHub commit activity.

Status rule: archived on GitHub = Archived; last commit within 90 days = Active; 91 to 365 days = Slowing; older = Stale. All figures come from the GitHub API on the date shown.

Most discussed open issues

  • #323 0.13.0+ won't start on Windows without a C toolchain: [email protected] ships no prebuilds, so require() throws before any command ru5 comments · 2026-09-09
  • #374 Runaway upkeep child processes when ~/.graft is unwritable in a sandbox4 comments · 2026-09-13
  • #326 Using skill instead of AGENTS.md4 comments · 2026-09-09
  • #313 Do not clobber statusline on first install4 comments · 2026-09-09
  • #298 graft build --deep: hardcoded maxTokens=8192 truncates tool-call JSON, and file-node summaries discarded due to id-decoration mismatch4 comments · 2026-09-04

Issue titles are quoted from GitHub. Open the link to check whether a problem still applies to the version you use.

04

Who it fits

Pick it if
  • You want to generate a readable, interconnected Markdown knowledge graph of your repository so coding agents (Claude Code, Cursor) can grep and explore without expensive re-indexing.
  • You want to reduce context token waste by giving agents precise map-like documentation of modules and call paths.
Look elsewhere if
  • You need an enterprise graph database with semantic vector embeddings and Cypher queries; code-graph-rag with Neo4j fits that scale.
  • You only have a small, single-file script or a trivial repository.
06

How it differs

code-graph-rag logovs code-graph-rag★ 5.3k

Graft compiles codebases into simple, static Markdown file graphs that any agent can read natively. Code-Graph-RAG deploys Neo4j and vector embeddings for deep semantic AST and graph database querying.

Full comparison →
07

Compatibility

Node.js
Runtime
Verified via docs
TypeScript
Language
Verified via docs
Python
Language
Verified via docs
Go
Language
Verified via docs
Java
Language
Verified via docs
R
Language
Verified via docs
08

Quick start

1
$ npm install -g @nanonets/graft
2
$ graft init
09

Use cases

↳Accelerating coding agents for faster and cheaper code understanding and generation.
↳Onboarding new developers or agents to complex codebases by providing pre-mapped context.
↳Identifying the blast radius of code changes to understand potential impacts.
↳Enhancing agent correctness in resolving real-world GitHub issues (SWE-bench verified).
↳Optimizing tool-call, token, and latency savings for LLM-powered coding workflows.
10

Alternatives

⚡Top VS:
VScode-graph-rag★5.3k→VSagentpack★18→VSagents-best-practices★2.4k→VScode-context-engine★440→
code-graph-rag logo
code-graph-rag★ 5.3k
The ultimate RAG for your monorepo. Query, understand, and edit multi-language codebases with the power of AI and knowledge graphs
VSCompare→
agentpack logo
agentpack★ 18
Local task-state ledger for AI coding agents. Preserve decisions, source conclusions, evidence, and checkpoints across Codex, Claude Code, Cursor, and other MCP clients.
VSCompare→
agents-best-practices logo
agents-best-practices★ 2.4k
Provider-neutral Agent Skill for Codex, Claude Code, and agentic harness design.
VSCompare→
code-context-engine logo
code-context-engine★ 440
Save 94% on AI coding tokens. Index your codebase, agents search instead of reading files. Works with Claude Code, Codex, Copilot, Cursor, Gemini CLI. Local MCP server, free, open source.
VSCompare→
ffmpeg-skill logo
ffmpeg-skill★ 3.1k
Local video editor for coding agents: 42 FFmpeg tools with a machine-readable contract and an MCP server, for Claude Code, Cursor and Codex. Cut, captions, reframe, loudness, platform exports. No cloud, no API keys.
VSCompare→
agent-shadow-brain logo
agent-shadow-brain★ 38
🧠 v6.0 Hive Mind — One open-source brain every AI coding agent can share (Claude Code, Cursor, Cline, Codex, Copilot, Windsurf). 22 novel features. Free. Local-first. MIT.
VSCompare→
pmb logo
pmb★ 287
Local-first persistent memory for AI coding agents (Claude Code, Cursor, Codex) via MCP. 94.5% LoCoMo recall@10, 70ms p50, multilingual, zero API keys.
VSCompare→
mcp-video logo
mcp-video★ 223
Video editing MCP server for AI agents. 87 FFmpeg and Hyperframes tools, Python client, and CLI. Local, fast, free.
VSCompare→
See all alternatives →

Comments

Log in to leave a comment

No comments yet. Be the first!

On this page
01Features02Why choose it03Trade-offs05Maintenance check04Who it fits06How it differs07Compatibility08Quick start09Use cases10Alternatives
trailhq /
Graft
↗

Builds a markdown knowledge graph of your codebase so coding agents explore less

10.8k952MIT
Last commit1d ago
StatusActive
CategoryCode Assistant
Contributors47
Links
Documentation↗Discussion↗Issues↗Releases↗
Cloud Infrastructure
Ad

Deploy on DigitalOcean

Host your MCP servers, Docker containers, and AI agents with $200 free credit over 60 days.

Claim $200 Free Credit
© 2026 AgentIndex.app|Built by a 10-year iOS Developer.
Best by use caseAboutContactAdvertisePrivacy PolicyTerms of UseQYSGitHubBuy me a coffee ☕

Browse by Category

MCP ServersCode AssistantWorkflow AutomationRAG / Knowledge BaseMulti-AgentBrowser AutomationLLM InfraDev ToolingObservability

Not affiliated with Anthropic, OpenAI or Microsoft.