Skip to main content

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

Metadata

Release files for graperoot 3.10.19

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for graperoot 3.10.19
File Size Uploaded Provenance
graperoot-3.10.19.tar.gz 1.3 MB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for graperoot 3.10.19
File
graperoot-3.10.19-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
graperoot-3.10.19-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details
graperoot-3.10.19-cp313-cp313-macosx_26_0_arm64.whl CPython 3.13 CPython 3.13 macOS 26.0+ ARM64 Details
graperoot-3.10.19-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
graperoot-3.10.19-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
graperoot-3.10.19-cp312-cp312-macosx_26_0_arm64.whl CPython 3.12 CPython 3.12 macOS 26.0+ ARM64 Details
graperoot-3.10.19-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
graperoot-3.10.19-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
graperoot-3.10.19-cp311-cp311-macosx_26_0_arm64.whl CPython 3.11 CPython 3.11 macOS 26.0+ ARM64 Details
graperoot-3.10.19-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
graperoot-3.10.19-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details

Total release size: 34.6 MB

Release files / graperoot-3.10.19.tar.gz

Download URL graperoot-3.10.19.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
426a76fc77943caea63fc319f367cbbff53d7ec5a9048170380e6c541141920b
BLAKE2b-256 checksum
How to use checksums
886527636097ba591a3181684fb607798cdbf3b8d9bae4d3f1dee0965f8b1f31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / graperoot-3.10.19-cp313-cp313-win_amd64.whl

Download URL graperoot-3.10.19-cp313-cp313-win_amd64.whl
Size 773.1 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
3a0fd43ef3d534d93a67904f37cea9a2f7f41ed95de4627a56fbe8c36198d092
BLAKE2b-256 checksum
How to use checksums
229f8f13e70ba5f236ca9153c59d1bad3ea2321fda9f71a6747e32cf5bb6bd84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / graperoot-3.10.19-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL graperoot-3.10.19-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 6.7 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
b5deb3c4e467ce8fbb3f91cf70437844ea143e7b55a278843dd2b45c3732d037
BLAKE2b-256 checksum
How to use checksums
7f695e5fb2d389d3ba159a8102b5af9144a9518a7d1c4dec7406f6007aa68af1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / graperoot-3.10.19-cp313-cp313-macosx_26_0_arm64.whl

Download URL graperoot-3.10.19-cp313-cp313-macosx_26_0_arm64.whl
Size 937.2 kB
Tags CPython 3.13 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
f134cbbd13b8fc0965633a391bc96997ca9b707af82e514da27ccb22f261ed3c
BLAKE2b-256 checksum
How to use checksums
7dd2555f8d60c8264e7c4aaf9ac7eb8cf151b475ed49ce85880fd3fc55f8da4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / graperoot-3.10.19-cp312-cp312-win_amd64.whl

Download URL graperoot-3.10.19-cp312-cp312-win_amd64.whl
Size 773.4 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
52d57248dc0a172ec1853b416af37e4b026eed4c16f5adac758f422f9b3673e0
BLAKE2b-256 checksum
How to use checksums
53dd85cedba910c2c547a007a4683ae14424271871284b3cc98e24f38c8d0a70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / graperoot-3.10.19-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL graperoot-3.10.19-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 6.7 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
15e81d9468e16fa43b57add7473dcc364807e7eab31a1a3f9def7cb969760784
BLAKE2b-256 checksum
How to use checksums
4ecffb6b553522547bb1c0011b3ca1279042754f11b8ffce31ab5b37fd8ef25e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / graperoot-3.10.19-cp312-cp312-macosx_26_0_arm64.whl

Download URL graperoot-3.10.19-cp312-cp312-macosx_26_0_arm64.whl
Size 941.5 kB
Tags CPython 3.12 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
ec0343b93f422986d0c7fcfdb996103d026a2eb2772cccc20b75fc5294cd3f33
BLAKE2b-256 checksum
How to use checksums
7791159d53a6219cf06aad3716b88f855fd224eec6f078f62214faaede4ecc8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / graperoot-3.10.19-cp311-cp311-win_amd64.whl

Download URL graperoot-3.10.19-cp311-cp311-win_amd64.whl
Size 826.4 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
c71dc9e443258ed992e5177d1ccf0258b84b87ffc4db977dfafe45b1dd7ed58d
BLAKE2b-256 checksum
How to use checksums
98311900beb0df1390cf6baf9e475e26d1c8b7c69c78393a1f0456bd98327ac0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / graperoot-3.10.19-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL graperoot-3.10.19-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 7.0 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
338a86bd0ec4a4132eb8cf3b8128818e059ad0754499738057aab8ff332b7825
BLAKE2b-256 checksum
How to use checksums
122594e2c8c07f22ecbb9103bd53db991df54befc45f23fbf2c05b8454c8cc1b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / graperoot-3.10.19-cp311-cp311-macosx_26_0_arm64.whl

Download URL graperoot-3.10.19-cp311-cp311-macosx_26_0_arm64.whl
Size 933.9 kB
Tags CPython 3.11 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
ceba0680dd5ee8495a2cdaf86d0454d453ce3589f10d8a2fe8d411ff21efbb11
BLAKE2b-256 checksum
How to use checksums
5f2daf99c073b2b3f8d24a65c5a75f17f15baeddfd7401e512c27e5afac8aba0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / graperoot-3.10.19-cp310-cp310-win_amd64.whl

Download URL graperoot-3.10.19-cp310-cp310-win_amd64.whl
Size 826.2 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
79f9b5ed7df98f062f8645bb2e278e395b277f99f16541b5c6fb374b0257c03f
BLAKE2b-256 checksum
How to use checksums
894c3cae87aa6443af06bab44aaaaf34a4e2f6bbeed3e0d132f0916d425727c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / graperoot-3.10.19-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL graperoot-3.10.19-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 6.7 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
6d90b63f58dd7bc306784e9b2b12d86c32058bd407b533eecc321cb5f92769dc
BLAKE2b-256 checksum
How to use checksums
4786e38e904ebc808fd46e864966c30559fcb82c78dc457b70c07e7ecd80de80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Security for graperoot 3.10.19

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.10.19 This release

12 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page