@codragraph/codex
OpenAI Codex CLI integration for CodraGraph. Enriches every Codex tool
call with graph-aware context (callers, impact, process participation)
and FeatureCluster packs for product areas like Settings/Auth/AI, so Codex
doesn't blindly grep its way through the codebase.
Install
npm install -g @codragraph/cli
codragraph setup
npm install -g @codragraph/codex
codragraph-codex
The codragraph-codex command is idempotent — re-run it after upgrades.
A sidecar ~/.codex/.codragraph-managed.json tracks which entries the
installer owns, so user-managed hooks/mcpServers are never overwritten.
What it does
- Pre-tool hook: when Codex is about to Grep / Glob / Read / Bash,
the hook calls
codragraph augment <pattern> and prepends the graph
context to Codex's next prompt.
- Post-edit hook: after Edit / Write, runs
codragraph detect-changes
to flag whether the index needs refreshing.
- MCP server: registers a
codragraph Codex MCP server (launching
codragraph mcp, or cmd /c codragraph mcp on Windows) so Codex can
call query / context / impact / feature_clusters / feature_context / cypher directly.
Configuration
API keys live in ~/.codragraph/config.json — the unified file the CLI,
harness, and web app all use.
codragraph config set openai --api-key sk-...
License
Apache-2.0. You can use, modify, redistribute, bundle, and host this
integration commercially, subject to the Apache-2.0 notice and attribution
requirements.