# Install & Configure: Dual-Graph: Compounding Context Engine for Claude Code & Codex CLI
## What This Is
Dual-Graph is a command-line tool that makes AI coding assistants like Claude Code and Codex CLI significantly cheaper and faster. It intelligently scans a software project to understand how the code is connected, then automatically provides the most relevant files to the AI for any given task, reducing wasted effort and cost.
Source: https://github.com/kunal12203/Codex-CLI-Compact
## Before You Start
Scan my workspace and analyze:
- The project language, framework, and directory structure
- Existing agent configuration (check for .claude/, .codex/, CLAUDE.md, settings.json, commands/, skills/ directories)
- Whether this repository or a similar tool is already cloned or installed
Then ask me before proceeding:
1. Do I need to configure any service credentials for this plugin (database, API keys, etc.)?
2. Should this be project-scoped or global?
## Fetch the Source
Clone or inspect the repository to understand what needs to be installed:
```bash
gh repo clone kunal12203/Codex-CLI-Compact
```
Review the README, directory structure, and any install instructions before proceeding.
## What to Implement
This is an **Agent Plugin** — typically an MCP server or capability bundle.
- Install any required npm/pip packages from the source repository
- Register the MCP server in `.claude/settings.json` under the `mcpServers` key with the correct command and args
- Configure any required environment variables or credentials
- Verify the server starts correctly by checking its expected output
## Additional Context
- Execute the appropriate installation script for the user's OS to install the Dual-Graph CLI. For macOS/Linux, run `curl -sSL https://raw.githubusercontent.com/kunal12203/Codex-CLI-Compact/main/install.sh | bash`. For Windows PowerShell, run `irm https://raw.githubusercontent.com/kunal12203/Codex-CLI-Compact/main/install.ps1 | iex`.
- Initialize Dual-Graph on the user's current project by running `dgc .` (for Claude Code) or `dg .` (for Codex CLI) in the project's root directory. This will create a local semantic graph of the codebase.
- For all subsequent tasks in this project, initiate the session through the Dual-Graph wrapper. Instead of calling the agent directly, execute `dgc "[user's task description]"` or `dg "[user's task description]"` to leverage the pre-loaded context.
## Reference Implementation
```
curl -sSL https://raw.githubusercontent.com/kunal12203/Codex-CLI-Compact/main/install.sh | bash
source ~/.zshrc # or ~/.bashrc / ~/.profile
```
## Guidelines
- Adapt everything to my existing project — do not assume a specific stack or directory layout
- Review any fetched code for safety before installing or executing it
- After setup, run a quick verification and show me a summary of exactly what was installed, where, and how to use it