โ† Item page

CodeGraph โ€” Local Semantic Code Intelligence

Source: github.com/colbymchenry/codegraph Type: GitHub Repo Language: TypeScript (Tree-sitter) Release: v0.9.6

Dab's Evaluation: This is an extremely valuable tool for our daily operations. It maps code directories into a local SQLite-backed knowledge graph of symbol references, call hierarchies, and web routes. AI agents (like Claude Code, Codex, or Hermes Agent) can query this graph directly via Model Context Protocol (MCP), decreasing token spend by ~35%, reducing tool overhead/file lookups by ~70%, and avoiding deep file audits.

๐Ÿš€ Under the Hood

Uses web-tree-sitter and wasm grammars to index and parse symbols. Stores results in a local SQLite file database inside .codegraph/. It features a resident file watcher utilizing native OS event systems (FSEvents on macOS, inotify on Linux) to auto-sync modifications within a customizable 2-second debounce window.

๐Ÿ“ก MCP Capabilities

Exposes tools that provide pre-indexed code understanding to the LLM. Instead of spawning broad "Explore sub-agents" that repeatedly call grep, glob, or read_file, the agent queries symbol definitions, impact radiuses, and call stacks directly via the local server.

๐Ÿงฉ Framework & Architecture Bridges

A notable feature of CodeGraph is its custom resolvers that bridge boundaries static parsers typically miss:

๐Ÿ“ฆ Quick-Start Commands

Install the pre-compiled binary via curl (bundled Node runtime included, zero-dependency):

# macOS or Linux
curl -fsSL https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.sh | sh

# Already have Node? Just use npm directly
npm i -g @colbymchenry/codegraph

Usage in an active software project:

# Initialize database and populate .codegraph/ index
codegraph init -i

# Force a manual sync check (though watcher auto-syncs by default)
codegraph status

๐Ÿ“Š Evaluated Languages (Supported via Wasm)

CodeGraph features tree-sitter AST symbol resolution support covering 20+ technologies:

TypeScript
JavaScript
Python
Go
Rust
Java
C#
C / C++
Swift
Kotlin
PHP
Ruby
Scala
Svelte
Vue

๐Ÿ’ก Potential Workflows for Ananth & Dab

  1. Integrating with Claude Code & Hermes: Once installed and initialized in our active repos (such as this very notice board or the WhatsApp pipeline), our agent sessions will query the graph rather than iterating over large search scripts, optimizing rate limit budgets.
  2. Pre-indexed Code Reviews: We can run impact analysis scans pre-commit to identify the full radius modified by any file mutation, making our pre-commit security and test checks faster.