Model or dataset
kunal12203/GrapeRoot avatar
kunal12203/GrapeRoot

GrapeRoot: pre-loading codebase context for AI coding assistants

Compounding Context for AI Coding Assistants — MCP graph engine for Claude Code, Cursor, Copilot, Gemini, OpenCode

1,038 stars123 forksPowerShellApache-2.0

At a glance

What is it?
GrapeRoot is an open-source launcher that wraps Claude Code, Cursor, Copilot and others, building a semantic graph of a project and packing relevant files into each prompt. The launcher scripts are Apache-2.0; the graph engine pip package is proprietary.
Who is it for?
Adopt GrapeRoot if you already drive Claude Code, Cursor, Copilot or a similar assistant over a large repository and want context selected before the model starts exploring. Skip it if you need the whole pipeline to be open source, since the pip package is proprietary, or if your project is small enough that a plain assistant already finds the relevant files.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 27 days ago.
What is it written in?
Mainly PowerShell, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.

Editorial analysis

The token-burn problem GrapeRoot targets

A coding assistant answering a question about a large repository spends its first several turns finding the code. The model calls a symbol search, reads the result, decides what to look up next, calls another tool, and only then starts reasoning about the actual question. Every one of those turns bills tokens, and the README's own comparison table frames the difference bluntly: other tools let the AI pull context on demand, while GrapeRoot pre-loads it before the turn begins.

The audience is narrow and specific. You need an existing AI coding assistant (Claude Code, Codex CLI, Cursor, Gemini CLI, OpenCode, Copilot and several others are listed), a repository big enough that discovery costs real money, and a willingness to route your assistant through a launcher command instead of calling it directly. On a small project the graph has little to find that the model would not have found anyway.

How the graph engine delivers context before the model sees your question

The data flow in the README is a five-step loop. You run the launcher against a project path. The project is scanned and a semantic graph is built from files, symbols and imports. When you ask something, the graph identifies the relevant files and packs them into the context. The assistant receives your question with the code already attached. Because the graph records which files were read, edited and queried, the README claims savings compound across a session rather than resetting each turn.

That last claim is the interesting one and also the one to treat carefully. The README explains the mechanism as cache re-billing: a token avoided on turn 3 is also skipped on every later turn. The benchmark table on graperoot.dev reports cost per prompt falling from $0.49 to $0.27 and average turns per task from 11.7 to 3.5 across codebases of 7,700+ files and 50+ engineering prompts. Those are the project's own published numbers, not an independent measurement, and the methodology lives at graperoot.dev/benchmarks.

A hard per-turn token cap is listed as a design choice: the README contrasts it with other tools where the AI decides its own budget. That cap is what makes cost predictable, and also what makes the wrong file selection expensive, since there is no exploration phase to recover from it.

Installing GrapeRoot and running dgc against a real project

Prerequisites are Python 3.10+, Node.js 18+, and one supported assistant. On macOS or Linux the README gives a curl install piped into bash:

bash
curl -sSL https://raw.githubusercontent.com/kunal12203/Codex-CLI-Compact/main/install.sh | bash
source ~/.zshrc   # or ~/.bashrc / ~/.profile

After sourcing your shell profile, the launcher commands should be on PATH. On Windows the equivalent is a PowerShell one-liner, and there is also a Scoop bucket named dual-graph:

powershell
irm https://raw.githubusercontent.com/kunal12203/Codex-CLI-Compact/main/install.ps1 | iex
powershell
scoop bucket add dual-graph https://github.com/kunal12203/scoop-dual-graph
scoop install dual-graph

The README warns explicitly that you should run dgc rather than claude directly, so the MCP server is running. A first real use is a scan plus a question in one command:

bash
dgc /path/to/project "fix the login bug"

What you should see is the project scanned into the graph, then your assistant opening with the relevant files already in context. The other front ends follow the same shape with a flag, for example graperoot . --cursor or graperoot . --gemini.

There is also a container path. The repository Dockerfile builds from python:3.12-slim, installs ripgrep, git and ca-certificates, installs requirements.txt (which pins mcp>=1.3.0,<1.20.0, uvicorn, anyio, starlette and graperoot), copies the dashboard directory, and sets DG_BASE_URL to http://127.0.0.1:8787. The container's CMD runs the dashboard start script. The README does not document what the dashboard exposes on that port.

The proprietary engine inside an Apache-2.0 launcher

This is the constraint that should decide adoption for many teams. The README states plainly: the launcher scripts in the repository are Apache 2.0, and the graph engine (the graperoot pip package) is proprietary. The LICENSE file at the repository root is Apache-2.0, but that covers the scripts, not the component doing the semantic work.

In practice that means you can read and modify the launcher, the install scripts and the dashboard, but the part that builds the graph and selects files is a closed dependency. If your organisation requires every component in the toolchain to be auditable open source, GrapeRoot fails that test at the pip install step. If you are comfortable with a proprietary engine behind an open wrapper, the split is at least documented rather than hidden.

The requirements.txt file makes the split visible: graperoot appears as an unpinned dependency alongside the pinned MCP range. An unpinned proprietary dependency is worth noting before you put this in a build pipeline, because you cannot review what changes between versions.

Where pre-loading context is the wrong approach

Pre-loading trades flexibility for speed, and that trade fails in specific situations. When the answer depends on something the graph does not model, such as runtime behaviour, configuration in a deployment environment, or a service the repository only calls, the pre-loaded files will be plausible and incomplete. The assistant has no exploration phase in which to notice the gap, because the README's whole design goal is zero exploration turns.

Language coverage is another boundary. The supported list is TypeScript, JavaScript, Python, Go, Swift, Rust, Java, Kotlin, Scala, C#, Ruby and PHP. A repository dominated by a language outside that list gets less from the graph, and the README does not describe fallback behaviour for unsupported files.

Finally, the launcher indirection is a real cost. You now invoke dgc or dg or a graperoot flag instead of your assistant directly, and the README's own warning about not calling claude directly means the MCP server has to be up for the setup to work. Teams that already have a tuned assistant configuration have to verify the launcher does not conflict with it.

GrapeRoot against pull-based code graph MCP servers

The comparison the README draws is with CodeGraph, code-graph-mcp and similar tools. Both approaches build a graph; they differ in who drives retrieval. In the pull model, the assistant calls search_symbol, get_callers or trace_route, reads the results, decides what else to look up, and calls more tools until it has enough context. GrapeRoot inverts that: the graph identifies relevant files automatically and they are packed into the prompt before the assistant sees the question.

The difference is not just speed. A pull-based server gives the model agency over what it reads, which helps when the relevant code is hard to predict from the question alone. GrapeRoot's push model assumes the graph's relevance ranking is good enough to skip that step, and the README's session memory and hard per-turn token cap only exist because retrieval is centralised. If your questions are exploratory rather than targeted, the pull model's extra turns are doing useful work that GrapeRoot deliberately removes.

Maintenance, releases and upgrade cost

The last push to the repository was on 2026-09-03, and the repository is not archived. The most recent tagged release is v1.0.3 from 2026-02-28, with v1.0.2 and v1.0.1 tagged minutes apart earlier the same day. So the release tags are roughly six months behind the commit activity, which suggests development happens on main between releases rather than through frequent versioned cuts.

For upgrade planning, the practical exposure is the unpinned graperoot dependency. The MCP library is constrained to >=1.3.0,<1.20.0, which limits one source of breakage, but nothing constrains the proprietary engine. The README does not document a rollback procedure, a version pinning strategy for the engine, or a changelog beyond the release list. If you deploy through the provided Dockerfile, pinning the image digest yourself is the only lever the repository gives you.

On licensing, Apache-2.0 on the launcher scripts permits commercial use and modification of those files. That says nothing about the proprietary pip package, whose terms are not described in the README. Treat the two as separate obligations and read the package's own licence before shipping.

Editorial conclusion

Adopt GrapeRoot if you already drive Claude Code, Cursor, Copilot or a similar assistant over a large repository and want context selected before the model starts exploring. Skip it if you need the whole pipeline to be open source, since the pip package is proprietary, or if your project is small enough that a plain assistant already finds the relevant files. Before committing, verify two things: that your assistant is on the supported list and that the graph engine installs cleanly on Python 3.10 or newer, since the launcher is only a wrapper around it.

Frequently asked questions

What is GrapeRoot?

It is an open-source launcher that sits between you and an AI coding assistant, building a semantic graph of your codebase and pre-loading relevant files into each prompt. The launcher scripts are Apache 2.0, while the graperoot pip package that does the graph work is proprietary.

How do I install GrapeRoot on macOS or Linux?

The README gives a curl command piped into bash from the Codex-CLI-Compact repository's install.sh, followed by sourcing your shell profile. Prerequisites are Python 3.10+, Node.js 18+, and one supported AI tool.

Which AI coding assistants does GrapeRoot support?

The README lists Claude Code, OpenAI Codex CLI, Cursor, Gemini CLI, OpenCode, GitHub Copilot, OpenClaw, Kilocode, MiMo Code, Antigravity, Kiro CLI and Command Code, each launched with its own command or flag.

Is GrapeRoot open source?

Partly. The README states that the launcher scripts in the repository are Apache 2.0, but the graph engine distributed as the graperoot pip package is proprietary.

Which programming languages does GrapeRoot's graph cover?

The README lists TypeScript, JavaScript, Python, Go, Swift, Rust, Java, Kotlin, Scala, C#, Ruby and PHP. It does not describe fallback behaviour for files outside that list.

Official sources

  1. kunal12203/GrapeRoot on GitHub
  2. License: Apache-2.0
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/kunal12203-graperoot.svg)](https://hysenlabs.com/projects/kunal12203-graperoot)