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.9.82.tar.gz (5.0 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.9.82-cp313-cp313-win_amd64.whl (4.6 MB view details)

Uploaded CPython 3.13Windows x86-64

graperoot-3.9.82-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.82-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.82-cp313-cp313-macosx_11_0_arm64.whl (4.7 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.13+ x86-64

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

Uploaded CPython 3.12Windows x86-64

graperoot-3.9.82-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.82-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.82-cp312-cp312-macosx_26_0_arm64.whl (5.8 MB view details)

Uploaded CPython 3.12macOS 26.0+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.13+ x86-64

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

Uploaded CPython 3.11Windows x86-64

graperoot-3.9.82-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.82-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.82-cp311-cp311-macosx_11_0_arm64.whl (4.7 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.9+ x86-64

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

Uploaded CPython 3.10Windows x86-64

graperoot-3.9.82-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.82-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.82-cp310-cp310-macosx_11_0_arm64.whl (4.7 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

graperoot-3.9.82-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.82.tar.gz.

File metadata

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

File hashes

Hashes for graperoot-3.9.82.tar.gz
Algorithm Hash digest
SHA256 33349302a45684177604b71bc4184b20d90f87f019aabbaede85c37726cb4449
MD5 b55a04c74c856a4abe9a91ae647e3d17
BLAKE2b-256 e141c516fd5712d749fc33f4e7dd0970a21722be839e8839753a366809d3b0bc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: graperoot-3.9.82-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.82-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d0aa2b9a700da33c20161287fd74510efdfb042e48d0a30de9f4a0582fa3082e
MD5 e0ec87d26c4984090c9a74c8770c9c15
BLAKE2b-256 79464152ddf5db27a1bff89bdf00d740eb5249642aed3a0bad3930245dcf05ce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graperoot-3.9.82-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ada903a3dd10681cbc9dc7d17198db6d3163ea2b159c20945b2779f4e85bab24
MD5 29b667d8214cae746c04199a71ef019e
BLAKE2b-256 d76a6d1f0008bd6e15ef5c8b2848a234e97a80b797677ec1fd27043654462cc2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graperoot-3.9.82-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a2b8b3e70241810b1b9320c15fcc3a74d13b97f7d3ebf06e113472d888441324
MD5 284a8d41c3098704de597a5c687c2cfe
BLAKE2b-256 0017ca5f40839b85d32bf1422f449a1ca88fd7f99714f60c0b1f94f4b30f1492

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graperoot-3.9.82-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0b481a6f1eb8bda93b5375c589624359f7de37ed4e0183bddefbbd8ac75e1737
MD5 8afb45b33788796a5ce9296cf91b0bab
BLAKE2b-256 e8ab92aac32823a3f484354af6fd6acefea6975a1a249041a4043d25d70ea13d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graperoot-3.9.82-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 cb3e25bd3205f7387faff3afd89c2915e7d1d0a910d17f47d80f73bcc9f5f585
MD5 3e3bdc1d240fb96a74d3aace8bcf8ecc
BLAKE2b-256 c12b0ff6e252244f81241db06644d41c6264c85877095f17f475303bdded4e3e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: graperoot-3.9.82-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.82-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a41639735a426f69193e784cf63466467541e200aa914a3fe61a7aaf102d14f4
MD5 dd3fc8c8cdf8aa6e0e40ade005873288
BLAKE2b-256 f87d2659ae85d6b828748c14b285acf16a115d128ff0b0251ff742da9802415d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graperoot-3.9.82-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ae64929a515f46c4d865590662a57bc5af05aada14083649bf9e980c2d78c423
MD5 d059548fb46ef7c4bdebcdb0d0079ad8
BLAKE2b-256 3fd81a911570e2547c326a4a1f2c87bad6cad3261c1f1cd2a41eb02d5b6b4036

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graperoot-3.9.82-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 dd7e3ac6f441f85960a15efa412a50b2d44febc3ecd9f062631a76e474adff69
MD5 85353e822f8216056cc26c8c04fd1678
BLAKE2b-256 7071ef7fa399074223d2477771fafc8159eff47d33a7e1b6d18d048424458f43

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graperoot-3.9.82-cp312-cp312-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 0b5d6ea5fc12fb95faddcc56ff9d7b977e11d40be120d1fb8e54bad16c5e2618
MD5 5aa744a9b555be9eac3f10c3205d1df7
BLAKE2b-256 a9bdc171e8a7f138114513d201a7721d87547daba5d5f7409a6601dda46f4ff9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graperoot-3.9.82-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b4769363d6aea50aa3f9225088a37e5f5f50bf1f6aadcca3449408da3a2c63fc
MD5 07cfd763f02ee01ca5ccde75502d7eed
BLAKE2b-256 a984ada582f2b748862f98c83e01f239b55d111c4da18a2b9256a145d0249fee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graperoot-3.9.82-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 121ea6324ec1fa1c8bb73b28e07c3014845bcbce3cdf43cb0be84ed014600d88
MD5 33a2754cc13403257c8b97f6686388c1
BLAKE2b-256 90741b11c0201f3104dd96552675c1bd6e1c9c0d4ac6938956d045fe310d935c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: graperoot-3.9.82-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.82-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 42255506accbb5ce2a3bb4583ee239ababa80724a6bebab8f740e2a6edcdcf2d
MD5 0558da78b05f63c4f916cfa5bb53d270
BLAKE2b-256 efc775f8d0f1dc469ca9a274f53e1a77d23a329659536755eb7e3ba9fe170886

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graperoot-3.9.82-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6350bba8a437fce45255b95764a569d9a1ffba62b2a61237498d5ac68993d07b
MD5 032d00d832927cba9a364bb3ddc8ce95
BLAKE2b-256 7375371b6fa46c2bbd9e70063ed7c8babf8efc911cbf6fc68a7f1b318f806591

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graperoot-3.9.82-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b8082e20aacd883959c8336e9ba987c4c63ce97b1cd0f342a2ff50cc55920816
MD5 7661a8577bc60330b0ae813169874137
BLAKE2b-256 5d343ff9a0e2a795789d136a556ed717e6a5cc462a9e813fa8c060fb94cbd24d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graperoot-3.9.82-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d0f5f45fc591719f98dd6350269a414fe7f20be2b019e666a87a3525efe1fe84
MD5 73e482c96c89c76b6703889174f96a38
BLAKE2b-256 4a6771cf494a406bb9748822c66f22b5770f7584cbc1f2459acc684cc419a66d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graperoot-3.9.82-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9aa67bfe0c12ccc45253c1461d2846d193ecc7a37b89024670a0718ec11d6baf
MD5 687fd9487a6e62e7d77cabab5779fe4d
BLAKE2b-256 01c8c42ed9cd88279d4f7af9a6a524e1c978d737b28975064ece007a3ade9db8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: graperoot-3.9.82-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.82-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 bf4f3f4d47a8c7b7f9799fc0c1220bc514338b9a237ed4db581b5030c83d2813
MD5 a76a936a8531a43bf596eb0996ab57b6
BLAKE2b-256 55985a2d3808585a5a0ba06b8dd0744c1f276419db12e212adc424a4a3915b94

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graperoot-3.9.82-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 28caaf662dea4f064b5856e267cc826cded5121865cf53884929f08a807077ba
MD5 f0a442015e2dabf6a79bbfbbde5cf588
BLAKE2b-256 381d1a90ce263db9230269e566dc36e8e576af01868db46825fd178f6c80c885

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graperoot-3.9.82-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 68d2028dd0e5404fc87b8bee3c849637dea8bf528f3e8a1380874e435d664c6e
MD5 83c7e283c0616cfb1dcd0715cd9bbafe
BLAKE2b-256 c4a56d145772076afb96ae4cae80d068f63982fffc3bc6db57c2fea9d683bdfe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graperoot-3.9.82-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e67e88d68c50abe65101b32c46aacd97c225eb2a90060db658d55c2739ce3d0d
MD5 999af09b228c3c83da5e84c8539feade
BLAKE2b-256 36e01da1077fe38f19ee942268b7982c2da2d5d4f476673fc5a491fd48c73cce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graperoot-3.9.82-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 020dcbea839fa7a170d3bd3f668e2a6cd5ab48eecfc1520ab76ce8962a70ef1d
MD5 017ce00371eb4920a94f17f30eaf2b0a
BLAKE2b-256 39bb660cc1ffb181f5701b9df526d77c519f90e8b6fd347838f74c2bf07d51b4

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