gitcortex
A code knowledge graph for Git repositories. GitCortex indexes your codebase on every commit and answers questions like "what calls this function?" or "what changed between these two branches?" — so your AI coding assistant can work with real structure instead of scanning raw files.
Install
pip install gitcortex
# or
pipx install gitcortex
# or
uv tool install gitcortex
Supports macOS (Apple Silicon + Intel), Linux (x86_64 + arm64), and Windows (x64). No Rust or compiler required — a pre-built binary is bundled in the wheel.
Quick start
cd your-repo
gcx init # index the repo + install git hooks
gcx serve # start the MCP server for your AI assistant
After gcx init, the graph updates automatically on every git commit, merge, rebase, and checkout. No manual re-runs needed.
What it does
GitCortex builds a queryable graph of your codebase — functions, structs, classes, interfaces, call relationships, inheritance chains — and keeps it current automatically.
- Works with: Rust, Python, TypeScript, JavaScript, Go, Java
- Integrates with: Claude Code, Cursor, Windsurf, GitHub Copilot, Antigravity
- Per-branch graphs: switching branches gives you the graph for that branch instantly
- Zero runtime dependency: single self-contained binary, nothing else to install
Commands
gcx init
Index the current repo, install git hooks, and register the MCP server with your editor.
gcx init # auto-detects your editor
gcx init --editor cursor # target a specific editor: claude, cursor, windsurf, copilot
gcx init --editor all # write configs for every supported editor
gcx serve
Start the MCP server so your AI assistant can query the knowledge graph.
gcx serve
Once running, your AI assistant has access to tools like find_callers, lookup_symbol, list_definitions, trace_path, and more.
gcx query
Query the graph from the terminal without an AI assistant.
gcx query lookup-symbol MyStruct
gcx query find-callers process_request
gcx query list-definitions src/lib.rs
gcx blast-radius
See which parts of the codebase are affected by changes between two branches — useful before merging.
gcx blast-radius --base main --head feat/my-feature
gcx blast-radius --base main --head feat/my-feature --format github-comment
gcx viz
Open an interactive graph in your browser.
gcx viz # opens on port 5678
gcx viz --port 9000
gcx viz --branch feat/my-feature
gcx viz --format dot > graph.dot # export as Graphviz DOT
gcx export
Generate a readable Markdown map of the codebase at .gitcortex/context.md. The git hook keeps it up to date automatically.
gcx export
gcx status
Show node and edge counts for the current branch.
gcx status
gcx clean
Wipe the local graph store and re-index from scratch on the next commit.
gcx clean
MCP tools available to your AI assistant
| Tool | What it answers |
|---|---|
lookup_symbol |
Where is MyStruct defined? |
find_callers |
What calls process_request? |
find_callees |
What does handle_request call? |
list_definitions |
What's defined in src/auth.rs? |
find_implementors |
What implements AuthProvider? |
trace_path |
How do you get from main to validate_token? |
find_unused_symbols |
What's never called (dead code candidates)? |
get_subgraph |
Everything within 2 hops of UserService |
detect_changes |
What changed + who's affected vs main? |
symbol_context |
Callers, callees, and uses for a symbol |
All tools accept an optional branch parameter.
Configuration
.gitcortex/config.toml (committed to your repo, shared with your team):
[index]
languages = ["rust", "typescript", "python", "go"]
max_file_size_kb = 500
.gitcortex/ignore (.gitignore syntax — files to exclude from indexing):
target/
build/
**/*.generated.rs
License
MIT — free for commercial and open-source use.
Metadata
Release files for gitcortex 0.7.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| gitcortex-0.7.6-py3-none-manylinux2014_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64 | Details for gitcortex-0.7.6-py3-none-manylinux2014_x86_64.whl |
| gitcortex-0.7.6-py3-none-manylinux2014_aarch64.whl | Python 3 | none | Linux glibc 2.17+ ARM64 | Details for gitcortex-0.7.6-py3-none-manylinux2014_aarch64.whl |
| gitcortex-0.7.6-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details for gitcortex-0.7.6-py3-none-macosx_11_0_arm64.whl |
| gitcortex-0.7.6-py3-none-macosx_10_12_x86_64.whl | Python 3 | none | macOS 10.12+ x86-64 | Details for gitcortex-0.7.6-py3-none-macosx_10_12_x86_64.whl |
Total release size: 73.8 MB
Release files / gitcortex-0.7.6-py3-none-manylinux2014_x86_64.whl
| Download URL | gitcortex-0.7.6-py3-none-manylinux2014_x86_64.whl |
|---|---|
| Size | 21.6 MB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
be58c03745a62dff95fdac8ad105262b7079b4640edb160bfccc53a39fdcb4a9
|
|
BLAKE2b-256 checksum How to use checksums |
3023d1984e5342cc175b641588707ce1b07902fe4e255e5578452c1ee7f0fb44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / gitcortex-0.7.6-py3-none-manylinux2014_aarch64.whl
| Download URL | gitcortex-0.7.6-py3-none-manylinux2014_aarch64.whl |
|---|---|
| Size | 19.1 MB |
| Tags | Linux glibc 2.17+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
a7a1af2fa1c02ce8e04b56c0068e9972d26d2489ed8b4a96b838ba78358576a0
|
|
BLAKE2b-256 checksum How to use checksums |
1045aba4fbb19fa9a217a9c00f83d40097cd9c19eba1fb6af3d740168b53f70c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / gitcortex-0.7.6-py3-none-macosx_11_0_arm64.whl
| Download URL | gitcortex-0.7.6-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 15.6 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
bd6b8b19c77a69f93b0cb4a4d36787e35aa9ad5907e11418fa88acd7de083bc8
|
|
BLAKE2b-256 checksum How to use checksums |
5e00f95faaff61c9c751c1f40852f8c1c53e89d2df334d59f814e2c529b7b217
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / gitcortex-0.7.6-py3-none-macosx_10_12_x86_64.whl
| Download URL | gitcortex-0.7.6-py3-none-macosx_10_12_x86_64.whl |
|---|---|
| Size | 17.5 MB |
| Tags | Python 3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
13f0aaa5714db466c4afd2d1eed9e85725a5728177825a35bb9a9fc6cb6d5ec9
|
|
BLAKE2b-256 checksum How to use checksums |
cac233fee473d85fe4086b7ac7c169779bfd44a8bbd991bb237ef0a499d72a50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for gitcortex 0.7.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.