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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

graperoot-3.9.85-cp313-cp313-win_amd64.whl (4.6 MB view details)

Uploaded CPython 3.13Windows x86-64

graperoot-3.9.85-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

graperoot-3.9.85-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (9.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64

graperoot-3.9.85-cp313-cp313-macosx_11_0_arm64.whl (4.7 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

graperoot-3.9.85-cp313-cp313-macosx_10_13_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

graperoot-3.9.85-cp312-cp312-win_amd64.whl (4.6 MB view details)

Uploaded CPython 3.12Windows x86-64

graperoot-3.9.85-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

graperoot-3.9.85-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (9.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

graperoot-3.9.85-cp312-cp312-macosx_11_0_arm64.whl (4.7 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

graperoot-3.9.85-cp312-cp312-macosx_10_13_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

graperoot-3.9.85-cp311-cp311-win_amd64.whl (4.6 MB view details)

Uploaded CPython 3.11Windows x86-64

graperoot-3.9.85-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

graperoot-3.9.85-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (9.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

graperoot-3.9.85-cp311-cp311-macosx_11_0_arm64.whl (4.7 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

graperoot-3.9.85-cp311-cp311-macosx_10_9_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

graperoot-3.9.85-cp310-cp310-win_amd64.whl (4.6 MB view details)

Uploaded CPython 3.10Windows x86-64

graperoot-3.9.85-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

graperoot-3.9.85-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (9.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

graperoot-3.9.85-cp310-cp310-macosx_11_0_arm64.whl (4.7 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

graperoot-3.9.85-cp310-cp310-macosx_10_9_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: graperoot-3.9.85-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 4.6 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for graperoot-3.9.85-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 1b6ae664c38778672401cec4a93c4ac2c9ccaa1de1c7dbdc9c7bad8ba6f66fdb
MD5 d27bbb36db521d85f3336687ac285267
BLAKE2b-256 48a63508d9a5d3d9139119ef1a1d9e8c772b27137ef383fb5bd11f1a32519f82

See more details on using hashes here.

File details

Details for the file graperoot-3.9.85-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for graperoot-3.9.85-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9eb90c847776b22f75521f243871b0c71343358dcd4e8e046615c94412463dc3
MD5 b32ebd39dda22d3e90c7c98670207979
BLAKE2b-256 8fe379cab58489862e299e8014e51cac1e112179aad672f8932b62c7ffbf37e7

See more details on using hashes here.

File details

Details for the file graperoot-3.9.85-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for graperoot-3.9.85-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2d33ade09e61b9511e62e7fcd99986402c753c2a08e67c5394a8eae312be4962
MD5 71c127d9ea446f7a60851056a6fec4dd
BLAKE2b-256 b934d5755633840bc9ebe40421427593db551b34d78d2a9dfaf356ca548796f7

See more details on using hashes here.

File details

Details for the file graperoot-3.9.85-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for graperoot-3.9.85-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 49873622a84b6584bc86af2c1768ba7b2057d3eecf3cc0dc4a60b3b12fcc6b3e
MD5 3879309aad895b2e69ef1576e12a0849
BLAKE2b-256 39f88c017e8b2867f5c3d53efcffa59b684b3202eb14f6f5fad1bdea2a161de2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graperoot-3.9.85-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 823114d7a7081dfc5e419bc834a32f83a35bb401c015d284fd6e6664665c4bc7
MD5 94f9a10dd2bab70cd3b9dcc33bb1f6e3
BLAKE2b-256 5d18361de08949710f39e10c1f8e5a3a49ab1858b7a16239de12b86ff9117f20

See more details on using hashes here.

File details

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

File metadata

  • Download URL: graperoot-3.9.85-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 4.6 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for graperoot-3.9.85-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ead490c3f0f4f1d953dedf6b3689d8bca2635045620075c937cb560da5c8886b
MD5 28262bbd30e62cd2fdb76c4029e2585a
BLAKE2b-256 daa8d21ff1c44f1f9438057d3ebaf5f02ec6a892b052d47e08f1d1cacaaeba14

See more details on using hashes here.

File details

Details for the file graperoot-3.9.85-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for graperoot-3.9.85-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d4e8c51d052c6d76c9d72923bf286c41a4816b53ecb31443b3fec01c2e43ce9a
MD5 ea8094726c0c1ae5812dcc1c7e18cab2
BLAKE2b-256 9330e5bf469098f02da54a3d17e849b6eb7c23013fce2a19f91c8d2b0926404f

See more details on using hashes here.

File details

Details for the file graperoot-3.9.85-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for graperoot-3.9.85-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 93b5b9d69a7644a80079aeaed3866404beef3fb8e598c82f1e7c43c5ea9f417e
MD5 7b5d873106e9a40c1de33fc24fa1f2de
BLAKE2b-256 07dfb0a20a51506f51d160fad55107d3d0ef3544f7b85c1b2347c1ff8097d523

See more details on using hashes here.

File details

Details for the file graperoot-3.9.85-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for graperoot-3.9.85-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2a3603919351e3a234d3e797b3116c6e7ff33cb19f47eec96539ae04a3213b75
MD5 14ec82211b43fa50d026cc6e67626070
BLAKE2b-256 a6e573f8d42d9c07f539a727314c106c2fec9673c34c54369512a5d49ec68a24

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graperoot-3.9.85-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 e405eded38c572ea62cf4a13811613f930cf19800205ffd7abbc68ed55eb8109
MD5 4c5426bbcda4d2ec925097904aa09fc0
BLAKE2b-256 5fd246ce2cac77a0a520107745db5b8ad3b576abf24e3c95746836307b45ce22

See more details on using hashes here.

File details

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

File metadata

  • Download URL: graperoot-3.9.85-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 4.6 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for graperoot-3.9.85-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5be9d3b96355a0298e4b5ad870385084b7ac9e14cf157f1d59a5f0a7c6bd9484
MD5 1ca58f84cee70f4a8e644774603fa8a9
BLAKE2b-256 fbcce1aadf9204907aef16c5a6e940338490cf1be4187f2ec9fd0020babf6f0b

See more details on using hashes here.

File details

Details for the file graperoot-3.9.85-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for graperoot-3.9.85-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b7e619f2f2794f024d149900cde290afda29036b08557d125835c8a164b05df1
MD5 cdb1548dbda2c131029fd01d01e6fd1d
BLAKE2b-256 d127d013945bf0aec15502430b902dbe1799c19e6f32f72d98975d16182e69be

See more details on using hashes here.

File details

Details for the file graperoot-3.9.85-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for graperoot-3.9.85-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 56134ef4613fc9b6959fecf47f4e68c9a3e76d291ec5d1e69f0f1d9b5b0c2ad6
MD5 edddbd1601fbd132426fe6b83eb0a32a
BLAKE2b-256 afbcc682a21c844fc7b0e2c1fa2a05f30f1ab06d6c5e394a4559ebfeb8cde9e8

See more details on using hashes here.

File details

Details for the file graperoot-3.9.85-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for graperoot-3.9.85-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 39f149e7d30e8583d605cfc59585fbfd76a156b986f8cc881442deec5c14df25
MD5 e9745e15de39c194f287def1d9cdc736
BLAKE2b-256 ab81d56485612a53a9a8b25a11f54885d1488020534a832096255bd5e98c81ce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graperoot-3.9.85-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 eeca8bad58c13454115e64d9adfffdc0e495762df8ad11c604e52171051c3e5f
MD5 f0b570b6a41657c6cd576b2dedfb04ab
BLAKE2b-256 3ca1ca4778102d41a7577899d9c00349faab464a4170d07c8b60f47c3d0e479b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: graperoot-3.9.85-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 4.6 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for graperoot-3.9.85-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 eddc850a3dcaafcbe72aa4a5f6b656623c39cfe95bc6ff9513f3351708cb52e9
MD5 87c22ca214136f6a31bae9463535d0a1
BLAKE2b-256 72b5c8e7ae6f5fe0861a705db1f168a7062c1fac5e8854b96de447d2219ba81c

See more details on using hashes here.

File details

Details for the file graperoot-3.9.85-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for graperoot-3.9.85-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3e2d0cbb6185e8f0ae9a91836dc7d8a3bcacfac3519c1bd5e371beb4dff5cb82
MD5 24380c4d12d6570d1f97c52ba55698be
BLAKE2b-256 72a7e7a249aabe6482ecea83b73f05f1603d3db79e06e7d21601ba5c016bc887

See more details on using hashes here.

File details

Details for the file graperoot-3.9.85-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for graperoot-3.9.85-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0bedb5ee16fd807eaafa520187b31e4b9cb943ce371c8f68eb241d593a835115
MD5 f0b975f1635e07b873113c9e9e47b904
BLAKE2b-256 a2307637ea08902b2cdee8b0e9c6cb7e28813f559e5687e281c315259c0c0efe

See more details on using hashes here.

File details

Details for the file graperoot-3.9.85-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for graperoot-3.9.85-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 147c71a0c786d53dfe9f1d27c7695df2dcf16eb7c097e7cce0aafed27cedab7d
MD5 0ef25553be5920f167c00fd1c93aced6
BLAKE2b-256 d10829fab79cdc2ade885b3919bbf5479474896a7657556bbd472de24ce8e9ea

See more details on using hashes here.

File details

Details for the file graperoot-3.9.85-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for graperoot-3.9.85-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 98dbc898e31a28c4a094b59cb04bc2556ed18d6876563294455c3803fa6a73f7
MD5 4c0d2156aa581a442572da09165eba19
BLAKE2b-256 67964366272ecd0decdba80ff52fb3406077017398dce3e1662623a2c413c732

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