v0.8.0 · MIT

Code relationships that stay useful while you code.

Explore callers, understand change impact, and query a branch-aware local graph with explicit freshness and source evidence — alongside your ordinary source search and tests. Indexing and graph queries run locally in Rust and embedded KuzuDB with zero LLM calls.

$ brew install bharath03-a/tap/gitcortex
gcx · find_callers · branch main index.state: ready
// an assistant asks: what breaks if I change Session.send?
index    ready · branch main · head a4f91c2
answer   3 production callers; risk signal is medium (verify in source & tests).
evidence
  Session.request src/requests/sessions.py:589 calls
  Session.get      src/requests/sessions.py:602 calls
  Session.post     src/requests/sessions.py:637 calls
coverage 3 of 3 · not truncated
explicit readinessfile:line evidencebounded payload

What's new in v0.8.0

30-Second Light-Theme Walkthrough

Before vs After: Grep exploration vs GitCortex v0.8.0

Inspect all 6 benchmark charts →
Live coding workflow

Edit, query, switch branches, recover — without guessing whether the graph is stale.

Static graphs only stay trustworthy when updates are fast, branches stay isolated, and degraded states say so explicitly instead of returning an empty caller list. Step through the four moments that matter in a real coding session.

post-commit · gcx hook 423 ms on ripgrep
$ git commit -m "refactor: extract retry helper"
gcx  [main]  diff a4f91c2..c8d20e1 · 1 file changed
     surviving symbols updated in place (incoming edges preserved)
     +1 symbol  +2 call edges  (423 ms)
ripgrep: 423 mstokio: 821 msdjango dense hub: 6.9 s
Supported update paths: git hooks (post-commit, post-merge, post-rewrite, post-checkout), manual refresh (gcx hook / gcx index), and optional file watching with persistent dirty-state tracking.
How it works

A typed graph, updated incrementally from your git history.

Four git hooks (post-commit, post-merge, post-rewrite, post-checkout) diff from the last indexed SHA rather than HEAD~1, so rebases, amends, and branch switches keep each branch's table synchronized — and manual gcx hook or gcx index recovers immediately whenever hooks are skipped.

Everything nameable is a node

Struct · Enum Trait · Interface Function · Method Module · File TypeAlias Constant · Macro Section

Every relationship is a typed edge

Contains Calls Implements Uses Imports References
The explorer

Same schema, painted as a graph you can walk.

gcx viz serves the graph as a local web app: an atlas for orientation across the whole repository, and an investigation canvas for tracing one symbol's exact neighbourhood. Both run against your own indexed repository. These are real captures of GitCortex indexing itself.

gcx viz · atlas · force layout
GitCortex graph explorer showing an entire repository as a force-directed node graph, coloured by symbol kind
gcx viz · investigate · symbol selected
GitCortex graph explorer zoomed into a cluster of functions, with one symbol selected and its neighbours labelled
Design decisions

Local analysis, bounded evidence, honest operational limits.

Local analysis

Embedded Rust + KuzuDB

Parsing, graph storage, and MCP/CLI queries run locally on your machine with no GitCortex cloud backend or LLM calls. Setup downloads packages/binaries as usual, and your AI assistant's own model requests follow its configured network path.

Incremental

Fast hooks + explicit readiness

Only changed files are re-parsed and reconciled from the last indexed SHA. Every response surfaces index.state (ready, stale, missing, or degraded) with recovery guidance.

Branch-aware

Isolated & reclaimable

Each branch gets its own isolated storage namespace and supports structural branch_diff. Dry-run-first gcx storage gc and compact reclaim disk from deleted branches.

Complementary

Graph + source + tests

gcx serve (MCP) and gcx query (CLI) accelerate caller, impact, and neighbourhood lookup while working alongside ordinary grep, file reads, and your test suite.

Capabilities

Parsing, progressive search, storage lifecycle, and visualization.

Multi-language AST parsing

A tree-sitter backend provides one structural extraction pipeline across every supported language: definitions, calls, imports, type usages, and Markdown references.

RustGoPythonTypeScriptJavaMarkdown

Progressive deterministic lexical search

Ranked lexical search over symbol names and qualified paths with filters, compact/full modes, and pagination so assistants narrow candidates before reading files. Optional local semantic search (fastembed-rs) is separately configurable and downloads local model weights on first enable.

deterministic lexicalcompact & fullpaginationoptional semantic

Typed question planning & impact

Read-only planning maps supported codebase questions to bounded relationship queries (find_callers, symbol_context, get_subgraph, pre_edit_impact) and asks for clarification when a question falls outside supported graph actions.

cross-file diversityproduction-firstexact-revision PR impact

Storage lifecycle & diagnostics

Inspect and reclaim multi-branch disk usage with dry-run-first gcx storage list / prune / gc / compact. Verify hooks, store health, and editor wiring via gcx doctor and gcx status.

dry-run default84%+ reclaimgcx doctor

Explorer & graph export

gcx viz renders the local graph with Cosmograph WebGL; gcx export emits Mermaid, DOT, JSON, HTML, SVG, and GraphML. Opt-in local diagnostic MCP call metadata is bounded to 2 MiB and excludes raw arguments and contents (usage insights and an Activity UI remain future work).

gcx vizMermaid / DOT / JSONopt-in diagnostics

Cross-editor setup & shared agent guide

gcx init indexes the repo, installs git hooks, registers MCP, and writes concise guidance so Claude Code, Codex CLI, Cursor, Windsurf, Copilot, and Antigravity know when to reach for graph tools — and when to stick to grep.

Claude CodeCodex CLICursorWindsurfAntigravity
Install · v0.8.0

Five ways in. All of them ship a binary.

Pre-built binaries cover macOS (arm64, x86_64) and Linux (x86_64, arm64). On Windows, use WSL2. Run gcx init in a repo to index, install git hooks, and wire in your AI assistant (or gcx init --editor none for CLI-only setup).

# macOS or Linux (v0.8.0)
brew install bharath03-a/tap/gitcortex

# Index, install git hooks, and interactively wire in your AI assistant
gcx init
gcx doctor

Installs the pre-built gcx binary. No Rust, Python, or Node.js runtime required.

Upgrading from v0.7.x (Graph Schema v15): v0.8.0 advances the embedded graph schema to v15 for fast incremental reconciliation and storage lifecycle metadata. After upgrading the binary, rebuild existing local indexes cleanly with gcx clean && gcx init (or run gcx init when prompted on schema mismatch), then verify with gcx doctor.
MCP server & CLI

Structured envelopes, not a chat box.

Add gcx serve to your MCP configuration (or call gcx query ... directly from CLI agents). Every response uses an object envelope carrying explicit readiness and coverage metadata.

  • lookup_symbol(name)Every definition matching a symbol name across the active branch
  • find_callers(name, depth?)Cross-file diversified callers with file:line evidence
  • symbol_context(name)360° view: definition, callers, callees, and type usages
  • get_subgraph(name, depth)Bounded neighbourhood: callers, callees, implementations
  • search_code(query)Progressive lexical search with filters, compact/full modes, and pagination
  • pre_edit_impact(name)Production-first transitive caller impact with separate test counts
  • branch_diff(from, to)Structural symbol & edge difference between two indexed branches
  • find_god_nodes / find_clustersIn-degree hub detection and deterministic label-propagation clusters

.mcp.json (project root)

{
  "mcpServers": {
    "gitcortex": {
      "command": "gcx",
      "args": ["serve"],
      "env": {}
    }
  }
}

Works with Claude Code, Codex CLI, Cursor, Windsurf, Copilot, Antigravity, and any other MCP host.

Measured

Claims you can reproduce, kept separate from historical runs.

Current v0.8.0 validation runs are kept strictly separate from older dated panels. Methodology, failures, and trade-offs are published alongside the wins on the full benchmarks page.

Full v0.8.0 pre-release validation across 10 pinned repositories: 45/45 model-free retrieval gate, 35-task Codex CLI (gpt-6.1-sol, low reasoning) agent suite, 10-repo cold indexing, and 3-repo incremental hook + 5-branch storage reclaim.

45 / 45
Deterministic retrieval

1.00 MRR and 1.00 file recall across 5 core repos (35 tasks) and 5 large repos (10 tasks).

−27.7%
Codex uncached tokens

35/35 valid, 35/35 quality non-inferior (0.943 → 0.986); 36–43% saved on relationship tasks.

423 ms
1-file commit hook

Measured on ripgrep (down from 4,170 ms). tokio: 821 ms; django hub: 6.9 s.

−84.5%
5-branch disk reclaim

Dry-run-first storage gc + compact reclaims 84.1–84.9% across ripgrep, tokio, django.

35-task Codex agent benchmark showing 36 to 43 percent uncached token savings on subgraph, impact, refactor, and callers questions, while plain search stays near grep parity
How to read this chart & key takeaways
  • Left of 0% = fewer tokens than grep: Each horizontal bar shows the percent change in uncached input tokens (the expensive, newly-read context an LLM processes) compared to an identical Codex CLI session using ordinary grep and file reads. The right column lists the corresponding change in total tokens (cached + uncached).
  • Where graph traversal wins biggest: Multi-hop relationship questions—subgraph (−43.0%), impact (−41.3%), refactor (−37.7%), and callers (−36.0%, while lifting accuracy from 0.80 → 1.00)—avoid repeated grep-and-read loops across dozens of files.
  • Honest boundary (search & tour): Single-hop lexical lookup stays near grep parity (−3.8% uncached, +9.8% total tokens). GitCortex is designed to complement source search and tests, not replace plain grep on trivial lookups.

Plain lexical search stays near grep parity (−3.8% uncached, +9.8% total tokens); unbudgeted unforced adoption improved pass rate from 14/16 to 16/16 (10/10 adoption, 0/6 false restraint calls) at higher total token spend. See all 6 graphs, competitor head-to-heads, and exact tables on benchmarks.html and compare.html.

Start in two commands. Verify with gcx doctor.

Index your repository locally, verify hook & editor readiness with gcx doctor, and keep ordinary source inspection and tests right next to the graph.