# CodeGraph

CodeGraph is an independent project under the MIT license, created and maintained
by Colby McHenry. It is not part of Maestria.

## What It Is

CodeGraph is a local-first code intelligence tool. It parses your codebase into
a queryable SQLite knowledge graph using tree-sitter WASM parsers. The index
auto-syncs via an OS file watcher as you edit files.

Accessing the graph requires no network; everything runs locally. CodeGraph
exposes an MCP server with a `codegraph_explore` tool that agents query instead
of running grep or read loops. One call returns the verbatim source of relevant
symbols, the call path among them, and a blast-radius summary.

It supports 20+ languages including TypeScript, JavaScript, Python, Go, Rust,
Java, and C#.

## Why Use It Alongside Maestria

CodeGraph gives any AI coding agent a faster, cheaper way to understand
codebases - one `codegraph_explore` call replaces 5-10 separate grep and read
operations. For Maestria-powered agents that follow the reconnaissance-first
pipeline, this means quicker context gathering before design and implementation
work.

The two projects are independent but complementary. Maestria provides the
disciplined workflow; CodeGraph provides efficient codebase access within that
workflow.

## Installation

Three options:

1. **npm global install:** `npm i -g @colbymchenry/codegraph`
2. **Run without install:** `npx @colbymchenry/codegraph`
3. **Standalone installer:** Download from the GitHub releases page

## Quick Start

Run `codegraph init` in your project root directory. CodeGraph builds the
knowledge graph index. Once indexed, agents can query CodeGraph via its MCP
server for efficient codebase exploration.

## Resources

[Official Docs](https://colbymchenry.github.io/codegraph/)
  [GitHub Repository](https://github.com/colbymchenry/codegraph)