Indexing a Project
Initialize and index
Section titled “Initialize and index”cd your-projectcodegraph init -i # initialize + full indexinit creates .codegraph/; -i/--index builds the index immediately. To initialize without indexing, drop the flag and run codegraph index later.
Full vs. incremental
Section titled “Full vs. incremental”codegraph index # full index of the whole projectcodegraph index --force # re-index from scratchcodegraph sync # incremental — only changed filessync is fast because it only reparses what changed. Use it after a branch switch or a batch of edits.
Stay fresh automatically
Section titled “Stay fresh automatically”When the MCP server is running, CodeGraph watches your project with native OS file events and syncs in the background — debounced, and filtered to source files only. You don’t need to run sync by hand during an agent session.
Check status
Section titled “Check status”codegraph statusReports node/edge/file counts, the active SQLite backend, and the journal mode.
What gets indexed
Section titled “What gets indexed”Every file whose extension maps to a supported language, minus anything your .gitignore excludes and files over 1 MB. See Configuration.