gitcortex 0.3.0__py3-none-macosx_11_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gitcortex/__init__.py +24 -0
- gitcortex/_bin/.gitignore +1 -0
- gitcortex/_bin/.gitkeep +0 -0
- gitcortex/_bin/gcx +0 -0
- gitcortex-0.3.0.dist-info/METADATA +172 -0
- gitcortex-0.3.0.dist-info/RECORD +8 -0
- gitcortex-0.3.0.dist-info/WHEEL +4 -0
- gitcortex-0.3.0.dist-info/entry_points.txt +2 -0
gitcortex/__init__.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
__version__ = "0.3.0"
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import stat
|
|
5
|
+
import subprocess
|
|
6
|
+
import sys
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def _binary_path() -> str:
|
|
10
|
+
bin_name = "gcx.exe" if sys.platform == "win32" else "gcx"
|
|
11
|
+
return os.path.join(os.path.dirname(__file__), "_bin", bin_name)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def main() -> None:
|
|
15
|
+
binary = _binary_path()
|
|
16
|
+
if not os.path.isfile(binary):
|
|
17
|
+
sys.exit(
|
|
18
|
+
f"gcx binary not found at {binary}.\n"
|
|
19
|
+
"Try reinstalling: pip install --force-reinstall gitcortex"
|
|
20
|
+
)
|
|
21
|
+
# Ensure the binary is executable (wheels may not preserve the bit)
|
|
22
|
+
current = os.stat(binary).st_mode
|
|
23
|
+
os.chmod(binary, current | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)
|
|
24
|
+
sys.exit(subprocess.call([binary] + sys.argv[1:]))
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
gcx
|
gitcortex/_bin/.gitkeep
ADDED
|
File without changes
|
gitcortex/_bin/gcx
ADDED
|
Binary file
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: gitcortex
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Git-aware code knowledge graph — incremental AST indexing on every commit, MCP server for AI assistants
|
|
5
|
+
Project-URL: Homepage, https://github.com/bharath03-a/GitCortex
|
|
6
|
+
Project-URL: Repository, https://github.com/bharath03-a/GitCortex
|
|
7
|
+
Project-URL: Bug Tracker, https://github.com/bharath03-a/GitCortex/issues
|
|
8
|
+
License: MIT
|
|
9
|
+
Keywords: ai,code-graph,git,mcp,tree-sitter
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Operating System :: MacOS
|
|
15
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
16
|
+
Classifier: Programming Language :: Rust
|
|
17
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
18
|
+
Classifier: Topic :: Utilities
|
|
19
|
+
Requires-Python: >=3.8
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
|
|
22
|
+
# gitcortex
|
|
23
|
+
|
|
24
|
+
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.
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pip install gitcortex
|
|
30
|
+
# or
|
|
31
|
+
pipx install gitcortex
|
|
32
|
+
# or
|
|
33
|
+
uv tool install gitcortex
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
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.
|
|
37
|
+
|
|
38
|
+
## Quick start
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
cd your-repo
|
|
42
|
+
gcx init # index the repo + install git hooks
|
|
43
|
+
gcx serve # start the MCP server for your AI assistant
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
After `gcx init`, the graph updates automatically on every `git commit`, `merge`, `rebase`, and `checkout`. No manual re-runs needed.
|
|
47
|
+
|
|
48
|
+
## What it does
|
|
49
|
+
|
|
50
|
+
GitCortex builds a queryable graph of your codebase — functions, structs, classes, interfaces, call relationships, inheritance chains — and keeps it current automatically.
|
|
51
|
+
|
|
52
|
+
- **Works with**: Rust, Python, TypeScript, JavaScript, Go, Java
|
|
53
|
+
- **Integrates with**: Claude Code, Cursor, Windsurf, GitHub Copilot, Antigravity
|
|
54
|
+
- **Per-branch graphs**: switching branches gives you the graph for that branch instantly
|
|
55
|
+
- **Zero runtime dependency**: single self-contained binary, nothing else to install
|
|
56
|
+
|
|
57
|
+
## Commands
|
|
58
|
+
|
|
59
|
+
### `gcx init`
|
|
60
|
+
|
|
61
|
+
Index the current repo, install git hooks, and register the MCP server with your editor.
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
gcx init # auto-detects your editor
|
|
65
|
+
gcx init --editor cursor # target a specific editor: claude, cursor, windsurf, copilot
|
|
66
|
+
gcx init --editor all # write configs for every supported editor
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### `gcx serve`
|
|
70
|
+
|
|
71
|
+
Start the MCP server so your AI assistant can query the knowledge graph.
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
gcx serve
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Once running, your AI assistant has access to tools like `find_callers`, `lookup_symbol`, `list_definitions`, `trace_path`, and more.
|
|
78
|
+
|
|
79
|
+
### `gcx query`
|
|
80
|
+
|
|
81
|
+
Query the graph from the terminal without an AI assistant.
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
gcx query lookup-symbol MyStruct
|
|
85
|
+
gcx query find-callers process_request
|
|
86
|
+
gcx query list-definitions src/lib.rs
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### `gcx blast-radius`
|
|
90
|
+
|
|
91
|
+
See which parts of the codebase are affected by changes between two branches — useful before merging.
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
gcx blast-radius --base main --head feat/my-feature
|
|
95
|
+
gcx blast-radius --base main --head feat/my-feature --format github-comment
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### `gcx viz`
|
|
99
|
+
|
|
100
|
+
Open an interactive graph in your browser.
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
gcx viz # opens on port 5678
|
|
104
|
+
gcx viz --port 9000
|
|
105
|
+
gcx viz --branch feat/my-feature
|
|
106
|
+
gcx viz --format dot > graph.dot # export as Graphviz DOT
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### `gcx export`
|
|
110
|
+
|
|
111
|
+
Generate a readable Markdown map of the codebase at `.gitcortex/context.md`. The git hook keeps it up to date automatically.
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
gcx export
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### `gcx status`
|
|
118
|
+
|
|
119
|
+
Show node and edge counts for the current branch.
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
gcx status
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### `gcx clean`
|
|
126
|
+
|
|
127
|
+
Wipe the local graph store and re-index from scratch on the next commit.
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
gcx clean
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## MCP tools available to your AI assistant
|
|
134
|
+
|
|
135
|
+
| Tool | What it answers |
|
|
136
|
+
|---|---|
|
|
137
|
+
| `lookup_symbol` | Where is `MyStruct` defined? |
|
|
138
|
+
| `find_callers` | What calls `process_request`? |
|
|
139
|
+
| `find_callees` | What does `handle_request` call? |
|
|
140
|
+
| `list_definitions` | What's defined in `src/auth.rs`? |
|
|
141
|
+
| `find_implementors` | What implements `AuthProvider`? |
|
|
142
|
+
| `trace_path` | How do you get from `main` to `validate_token`? |
|
|
143
|
+
| `find_unused_symbols` | What's never called (dead code candidates)? |
|
|
144
|
+
| `get_subgraph` | Everything within 2 hops of `UserService` |
|
|
145
|
+
| `detect_changes` | What changed + who's affected vs main? |
|
|
146
|
+
| `symbol_context` | Callers, callees, and uses for a symbol |
|
|
147
|
+
|
|
148
|
+
All tools accept an optional `branch` parameter.
|
|
149
|
+
|
|
150
|
+
## Configuration
|
|
151
|
+
|
|
152
|
+
`.gitcortex/config.toml` (committed to your repo, shared with your team):
|
|
153
|
+
|
|
154
|
+
```toml
|
|
155
|
+
[index]
|
|
156
|
+
languages = ["rust", "typescript", "python", "go"]
|
|
157
|
+
max_file_size_kb = 500
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
`.gitcortex/ignore` (`.gitignore` syntax — files to exclude from indexing):
|
|
161
|
+
|
|
162
|
+
```
|
|
163
|
+
target/
|
|
164
|
+
build/
|
|
165
|
+
**/*.generated.rs
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## License
|
|
169
|
+
|
|
170
|
+
MIT — free for commercial and open-source use.
|
|
171
|
+
|
|
172
|
+
[GitHub](https://github.com/bharath03-a/GitCortex) · [Issues](https://github.com/bharath03-a/GitCortex/issues)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
gitcortex/__init__.py,sha256=-aCxEktYu-BcSG9tMbO1V2as20b_tHDWW682FPFYVX8,711
|
|
2
|
+
gitcortex/_bin/.gitignore,sha256=eqRdoINJ6Ddnr127eoTJ6aSbh2SNtCz4Z_4Rob7SNgM,4
|
|
3
|
+
gitcortex/_bin/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
gitcortex/_bin/gcx,sha256=0DDtSPXBaKvTWN7bBHwMRv9ge5rNZWTnfbdfxCgSGyo,25991920
|
|
5
|
+
gitcortex-0.3.0.dist-info/METADATA,sha256=5kWbh7_lr2UO5hjgQGGcpBf7ajY10kZCoUV9eghGwSk,5167
|
|
6
|
+
gitcortex-0.3.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
7
|
+
gitcortex-0.3.0.dist-info/entry_points.txt,sha256=4Te0pK4yB3kVq-3K1qyrQSJ155wP43UXMGYrMqsLQb0,39
|
|
8
|
+
gitcortex-0.3.0.dist-info/RECORD,,
|