NxtSoftLabs
CGRAPH DOCS — CONTENTS
CGRAPH

Configuration

CGraph is configured mostly through flags (see the CLI Reference) and a small set of environment variables. This page collects the environment and the resolution rules that decide what runs against what.

Environment variables

VariableUsed byMeaning
VCPKG_ROOTbuildPath to vcpkg for the CMake build.
CLAUDE_PROJECT_DIRcgraph-mcpProject root when no --root is given (set by Claude Code).
CGRAPH_DAEMON_PATHcgraph-mcpExplicit path to the graphd binary.

Root resolution

When cgraph-mcp needs the project root, it resolves in priority order:

--root flag  >  CLAUDE_PROJECT_DIR  >  working directory

Daemon discovery

When cgraph-mcp needs the daemon, it resolves in priority order:

--daemon <path>  >  CGRAPH_DAEMON_PATH  >  graphd next to the binary  >  build-tree layout

This layered resolution is why an agent usually needs no configuration: with the binaries built side by side and CLAUDE_PROJECT_DIR set, the defaults resolve correctly.

Output location

The graph and its exports are written to the directory given by --out (conventionally cgraph-out/), which is also where the daemon re-persists incremental state.

Warning

CGraph does not have a documented configuration file in the public README — behavior is driven by flags, the enrichment drop directory, and the environment variables above. If a config-file format exists in the source, it is intentionally not documented here until it can be verified. This section will be expanded from the real configuration surface, not invented.