Skip to main content

GrapeRoot — graph-based context engine for AI coding agents

Project description

Dual-Graph — Compounding Context for Claude Code & Codex CLI

A context engine that makes Claude Code and Codex CLI 30-45% cheaper without sacrificing quality. It builds a semantic graph of your codebase and pre-loads the right files into every prompt — so Claude spends tokens reasoning, not exploring.

Works on macOS, Linux, and Windows. Supports any project size.

Join the community: discord.gg/ptyr7KJz


How It Works

You run: dgc /path/to/project
         ↓
1. Project scanned → semantic graph built (files, symbols, imports)
2. You ask a question
3. Graph identifies the relevant files → packs them into context
4. Claude gets your question + the right code already loaded
5. Fewer turns, fewer tokens, better answers

Token savings compound across a session. The graph remembers which files were read, edited, and queried — each turn gets cheaper.


Results

Benchmarked across 80+ prompts (5 complexity levels) on a real-world full-stack app:

Metric Without Dual-Graph With Dual-Graph
Avg cost per prompt $0.46 $0.27
Avg turns 16.8 10.3
Avg response time 186s 134s
Quality (regex scorer) 82.7/100 87.1/100

Cost wins on 16 out of 20 prompts. Quality equal or better on all complexity levels.


Install

macOS / Linux:

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

Windows (PowerShell):

irm https://raw.githubusercontent.com/kunal12203/Codex-CLI-Compact/main/install.ps1 | iex

Windows (Scoop):

scoop bucket add dual-graph https://github.com/kunal12203/scoop-dual-graph
scoop install dual-graph

Prerequisites: Python 3.10+, Node.js 18+, Claude Code or Codex CLI. The installer detects missing tools and offers to install them via winget (Windows) or homebrew (macOS).


Usage

Claude Code (dgc)

dgc                              # scan current directory, launch Claude
dgc /path/to/project             # scan a specific project
dgc /path/to/project "fix the login bug"   # start with a prompt

Codex CLI (dg)

dg                               # scan current directory, launch Codex
dg /path/to/project              # scan a specific project
dg /path/to/project "add tests"  # start with a prompt

Windows

dgc .                            # from inside the project directory
dgc "D:\projects\my-app"         # any drive, any path
dg "C:\work\backend"             # Codex CLI

What It Does Under the Hood

  1. Scans your project — extracts files, functions, classes, import relationships into a local graph.
  2. Pre-loads context — when you ask a question, the graph ranks relevant files and packs them into the prompt before Claude sees it. No extra tool calls needed.
  3. Remembers across turns — files you've read or edited are prioritized in future turns. Context compounds.
  4. MCP tools available — Claude can still explore the codebase via graph-aware tools (graph_read, graph_retrieve, graph_neighbors, etc.) when it needs to go deeper.

All processing is local. No code leaves your machine.


Data & Files

All data lives in <project>/.dual-graph/ (gitignored automatically).

File Description
info_graph.json Semantic graph of the project: files, symbols, edges
chat_action_graph.json Session memory: reads, edits, queries, decisions
context-store.json Persistent store for decisions/tasks/facts across sessions
mcp_server.log MCP server logs

Global files in ~/.dual-graph/:

File Description
dgc.ps1 / dg.ps1 Launcher scripts (auto-updated)
venv/ Python virtual environment for dependencies
version.txt Current installed version

Configuration

All optional, via environment variables:

Variable Default Description
DG_HARD_MAX_READ_CHARS 4000 Max characters per file read
DG_TURN_READ_BUDGET_CHARS 18000 Total read budget per turn
DG_FALLBACK_MAX_CALLS_PER_TURN 1 Max fallback grep calls per turn
DG_RETRIEVE_CACHE_TTL_SEC 900 Retrieval cache TTL (15 min)
DG_MCP_PORT auto (8080-8099) Force a specific MCP server port

Context Store

Decisions, tasks, and facts from your sessions are persisted in .dual-graph/context-store.json and re-injected at the start of the next session. This gives Claude continuity across conversations.

You can also create a CONTEXT.md in your project root for free-form session notes.


Token Tracking

A token-counter dashboard is registered automatically with Claude Code:

http://localhost:8899

Usage from inside a Claude session:

count_tokens({text: "<content>"})   # estimate tokens before reading
get_session_stats()                  # running session cost

Self-Update

The launcher checks for updates on every run and auto-updates if a new version is available. No manual intervention needed.

Current version: 3.8.55


Privacy & Security

  • All project data stays local. Graphs, session data, and code never leave your machine.
  • The only outbound calls are:
    • Version check — fetches a version string (no project data).
    • Heartbeat — sends machine_id and platform only. No file names, no code.
    • One-time feedback — optional rating after first day of use.
  • .dual-graph/ is automatically added to .gitignore.

Community

Have a question, found a bug, or want to share feedback?

Join the Discord: discord.gg/ptyr7KJz

  • Get help with setup
  • Report bugs
  • Share workflows
  • Follow releases

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

graperoot-3.10.10.tar.gz (2.7 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

graperoot-3.10.10-cp313-cp313-win_arm64.whl (1.6 MB view details)

Uploaded CPython 3.13Windows ARM64

graperoot-3.10.10-cp313-cp313-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.13Windows x86-64

graperoot-3.10.10-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (10.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

graperoot-3.10.10-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (10.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

graperoot-3.10.10-cp313-cp313-macosx_26_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.13macOS 26.0+ ARM64

graperoot-3.10.10-cp313-cp313-macosx_10_13_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

graperoot-3.10.10-cp312-cp312-win_arm64.whl (1.6 MB view details)

Uploaded CPython 3.12Windows ARM64

graperoot-3.10.10-cp312-cp312-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.12Windows x86-64

graperoot-3.10.10-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (10.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

graperoot-3.10.10-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (10.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

graperoot-3.10.10-cp312-cp312-macosx_26_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.12macOS 26.0+ ARM64

graperoot-3.10.10-cp312-cp312-macosx_10_13_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

graperoot-3.10.10-cp311-cp311-win_arm64.whl (1.6 MB view details)

Uploaded CPython 3.11Windows ARM64

graperoot-3.10.10-cp311-cp311-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.11Windows x86-64

graperoot-3.10.10-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (10.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

graperoot-3.10.10-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (10.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

graperoot-3.10.10-cp311-cp311-macosx_26_0_arm64.whl (2.4 MB view details)

Uploaded CPython 3.11macOS 26.0+ ARM64

graperoot-3.10.10-cp311-cp311-macosx_10_9_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

graperoot-3.10.10-cp310-cp310-win_arm64.whl (1.6 MB view details)

Uploaded CPython 3.10Windows ARM64

graperoot-3.10.10-cp310-cp310-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.10Windows x86-64

graperoot-3.10.10-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (10.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

graperoot-3.10.10-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (10.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

File details

Details for the file graperoot-3.10.10.tar.gz.

File metadata

  • Download URL: graperoot-3.10.10.tar.gz
  • Upload date:
  • Size: 2.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for graperoot-3.10.10.tar.gz
Algorithm Hash digest
SHA256 66b5e52775b0adeffa7bf7037fd61f0327142a5b00b80e58c7880a056abccc92
MD5 03e4069eb13877430aa118b99be22e16
BLAKE2b-256 d1e637f09a86a59a0c602545c790df586bed73aa9ad5ea6a86d9e8ebe9d90016

See more details on using hashes here.

File details

Details for the file graperoot-3.10.10-cp313-cp313-win_arm64.whl.

File metadata

File hashes

Hashes for graperoot-3.10.10-cp313-cp313-win_arm64.whl
Algorithm Hash digest
SHA256 63340d6cb3e241583da062fa2329983983c9c3da4d7083392eb4cd768b972fee
MD5 26bdea88778e4e4141d9cf9d14a5888e
BLAKE2b-256 b615988b40a0f7fa9d8515296f8e925e4962323fd18e6de597fef418fd1b8a1e

See more details on using hashes here.

File details

Details for the file graperoot-3.10.10-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for graperoot-3.10.10-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 f8d597964bc646cdd88a62d18f52ffc3bfc1b48650464996c1335fea10235148
MD5 c792bd6561c4bfbd9392b1b9a655238c
BLAKE2b-256 2e81225d0d6be2bee00bbba816c8136986e31ab853a1c2d2ff553b1c41ed60a5

See more details on using hashes here.

File details

Details for the file graperoot-3.10.10-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for graperoot-3.10.10-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2994da4c0057513e57cfbbfd766995ea1876ae0757429650544a0c24dc309333
MD5 ff24cb9d42cb37d8e5315d1e6f8d6dea
BLAKE2b-256 6545339c7d035bba6f7f417b86a0ca974f7d4827696a989321b17439468b024b

See more details on using hashes here.

File details

Details for the file graperoot-3.10.10-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for graperoot-3.10.10-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 fc484ff1dbbebed09780faa9d2233f215a11b586590a543a3418a6420dc32de2
MD5 745ab3b694948f2ffeb741e16e0067d2
BLAKE2b-256 e5e145718ac42eb69234d2ba8ea098faa6527e27f825aa3ae25e6e045251da80

See more details on using hashes here.

File details

Details for the file graperoot-3.10.10-cp313-cp313-macosx_26_0_arm64.whl.

File metadata

File hashes

Hashes for graperoot-3.10.10-cp313-cp313-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 66ea1b11032059f256b134328270821f6604f114598b47dc59aadd14d0215451
MD5 b8c5fc1b25c6d5e81dea050f5167ce9c
BLAKE2b-256 b7273b365a9f3f0fa7c4d9cd367b1156021af6c28b58c3a83a9ca9d354a2ab77

See more details on using hashes here.

File details

Details for the file graperoot-3.10.10-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for graperoot-3.10.10-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 3a852e0720e0193d03b503beffb6e1d2d0394659cf2b6f61a93ac4fb89dcd1eb
MD5 cfd9f8a874b5d9eb58b8f176bcd74470
BLAKE2b-256 219325e2832147ad915abd08779674c176ee1c3b601b74feafa46502dcb22925

See more details on using hashes here.

File details

Details for the file graperoot-3.10.10-cp312-cp312-win_arm64.whl.

File metadata

File hashes

Hashes for graperoot-3.10.10-cp312-cp312-win_arm64.whl
Algorithm Hash digest
SHA256 051b9569e8022c1081f805f5e9f76b892d380ef86ecf34d19067d9b1679f7486
MD5 a5ffe10d26295b11163ea41152816bf0
BLAKE2b-256 5ed74ab57c696824009f8e935dca2314296f5c49810f739abf90140d91c38cbc

See more details on using hashes here.

File details

Details for the file graperoot-3.10.10-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for graperoot-3.10.10-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 6c45cf12703c79e07edb5ff3b84db72b277977df3ca25f57beba72bf87a77a09
MD5 aae434ef93e987f052d372f4818674b6
BLAKE2b-256 d0334b7667a0207e49c7613d0708d63d99811c79d50dbb6ae882faa01596345e

See more details on using hashes here.

File details

Details for the file graperoot-3.10.10-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for graperoot-3.10.10-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7ed69d2054d344a2bee91fe14b05702a9f3a42a382c7900685b2374ccc248b22
MD5 ca96240be43dcd2be0ce3c59dfd01149
BLAKE2b-256 d8912f53f6f194707607de29440a28ed1ffb221e0bc39c8a0686a97b52d46593

See more details on using hashes here.

File details

Details for the file graperoot-3.10.10-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for graperoot-3.10.10-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 edfddafad91c8de35191d8328cc14ba9db4898d4e6f96ebbe19009ba4fd6c5fb
MD5 0a92eb44044ccf36f05d3e20e24aeead
BLAKE2b-256 446185a0a6de26a16298c761f422500775a6623bbfb7fbe352ac3762c2cda527

See more details on using hashes here.

File details

Details for the file graperoot-3.10.10-cp312-cp312-macosx_26_0_arm64.whl.

File metadata

File hashes

Hashes for graperoot-3.10.10-cp312-cp312-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 340e77acadc95ee10b59c30654bb4c5b74538f3b6e951c4b8afeae8ec693d682
MD5 287bcaaf20eb101368490b5ac592ba50
BLAKE2b-256 f9e59deb0374e45b626c2e7b06a5a28c9f1d0fe3f9738ca2e2324df51c28fa9b

See more details on using hashes here.

File details

Details for the file graperoot-3.10.10-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for graperoot-3.10.10-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 c8a2ccca602ef487fa71390b6cb5a16e3260c81a0f447fed6aee275856069f7d
MD5 f5478edb471f9a7bfee0108998b93533
BLAKE2b-256 3f0495fb179eca657d35b9c07816ab4d6cc8a7099885603b22357c49511e7b57

See more details on using hashes here.

File details

Details for the file graperoot-3.10.10-cp311-cp311-win_arm64.whl.

File metadata

File hashes

Hashes for graperoot-3.10.10-cp311-cp311-win_arm64.whl
Algorithm Hash digest
SHA256 72a7b9e9329a4e0793377f0a4a8329c92a729a546f007e9a53f12068f60a4a07
MD5 02cd757863be1dcd94f1f15329f0d98f
BLAKE2b-256 9debc9e0e9615429530f983651e4dfcfc6c40487efa4ea2f4ff06ec9aa20ea35

See more details on using hashes here.

File details

Details for the file graperoot-3.10.10-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for graperoot-3.10.10-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c5f1bf933b33da8c5e2ed2c809202fab5443dbfec94a2062f3b4b215956da554
MD5 53819d742c41c74535c46703d845c44e
BLAKE2b-256 2d36276a42102da5350fbef76a924f5affbf742e7582803f6b1923ca6b1cdc75

See more details on using hashes here.

File details

Details for the file graperoot-3.10.10-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for graperoot-3.10.10-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 804e0d2d9c61ac93c4d1ee83b23217eadd892f44d7fb56d3acf08d94414d207f
MD5 b06335a46142d9d25b186f69a1e2fda2
BLAKE2b-256 cc6eb408ac6806d4542ab22b3408b11d59f5ff6100d220bbd3d30a507e588a83

See more details on using hashes here.

File details

Details for the file graperoot-3.10.10-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for graperoot-3.10.10-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 21b02e36246ee29502acaa13d9ed0a969161e8b90edfd12b76a770c30ff5503b
MD5 8ddcf850b6e9cb3593eedf910cb30968
BLAKE2b-256 e06276d44cca70d98e7b7857a3b2c980744892c78a52ac9c17ba0ebab6781dc4

See more details on using hashes here.

File details

Details for the file graperoot-3.10.10-cp311-cp311-macosx_26_0_arm64.whl.

File metadata

File hashes

Hashes for graperoot-3.10.10-cp311-cp311-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 db97db04ee6a6346edd8653c5fdd71331b736ea5781a4a14929d0230c3bbeb41
MD5 e25b67ab484aad2c33f597968b43f422
BLAKE2b-256 a99d21171e7bbbdd82818671f653b5fc2405f762e821c299bc6a48b810f78c8c

See more details on using hashes here.

File details

Details for the file graperoot-3.10.10-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for graperoot-3.10.10-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a3a1f7a915096534bac5b79ffe301cf93806b6fa5b0657139df9ff56774114f5
MD5 7d7a83a215860174a02b5834dd0bf92b
BLAKE2b-256 a3517b1ec5cd65b560082dc26512de56c9e77ebf902c1d82b51c2bfef58d4f10

See more details on using hashes here.

File details

Details for the file graperoot-3.10.10-cp310-cp310-win_arm64.whl.

File metadata

File hashes

Hashes for graperoot-3.10.10-cp310-cp310-win_arm64.whl
Algorithm Hash digest
SHA256 7d7661fdd84b90961a6c216af5fdf2f7b499939bf2e47a456362fab78578b41d
MD5 4f3a88a65f649b515c5e23860e4f6f00
BLAKE2b-256 423dbf77533dc2843ef1de2bda9648b1dd9bbf59780504f05e04b35ee648613b

See more details on using hashes here.

File details

Details for the file graperoot-3.10.10-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for graperoot-3.10.10-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a10f8f1e8b7e775ca0d8c37156b132424e80ea745db11dfc31fe2886301349a3
MD5 c51289b8ffff510cdb6c09e67a918007
BLAKE2b-256 b5099f1971a0ca6af02c29131333c88b7699a8abb5e9363b3507384751a1f9ff

See more details on using hashes here.

File details

Details for the file graperoot-3.10.10-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for graperoot-3.10.10-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 546310f301c6093105b20d88bd6fd5eda6b5783b647ecb555a2b1004f46bb434
MD5 bb9c7661aa3255bbacb9bac1b036ab2a
BLAKE2b-256 71345bd627b60d10b384a676a6cc6fe881ebec08bacd282b58fdc821035435a3

See more details on using hashes here.

File details

Details for the file graperoot-3.10.10-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for graperoot-3.10.10-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7f7ad04b5ef78133cf4323bdea01345586b6e23a32df6bc876b11582dade40d0
MD5 da2335bf08245ba6a41bf8d1f1893386
BLAKE2b-256 7a850ebc6772d2ba4eb5d2c4e4db8971e07defd40cc9fc449e5e67099a2b0a3e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page