execdiff-git-ai 1.0.2__tar.gz → 1.0.3__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: execdiff-git-ai
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Summary: AI Impact Assessment for git changes - understand what your AI copilot changed before you commit.
5
5
  Author-email: Anup Moncy <n93181165@gmail.com>
6
6
  License: Apache License
@@ -45,27 +45,25 @@ Dynamic: license-file
45
45
 
46
46
  AI Impact Assessment for git changes - understand what your AI copilot changed before you commit it.
47
47
 
48
- ## Overview
48
+ ## Intro
49
49
 
50
- ExecDiff Git AI is a Python CLI tool that helps developers understand the scope and implications of code changes made by AI coding assistants (like GitHub Copilot, Cursor, or Replit AI) by analyzing git diffs and extracting modified symbols (functions, classes, variables). It can optionally use a local LLM (Ollama) to assess the business impact of each change.
51
-
52
- ## Privacy
53
-
54
- ExecDiff Git AI runs **entirely locally**.
50
+ ExecDiff Git AI is a Python CLI tool that helps developers understand the scope and implications of code changes made by AI coding assistants (like GitHub Copilot, Cursor, or Replit AI). It analyzes git diffs and extracts modified symbols (functions, classes, variables).
55
51
 
52
+ **100% Local - No Cloud Required**
56
53
  - ✅ No code is uploaded
57
54
  - ✅ No cloud calls required
58
55
  - ✅ No telemetry
59
56
  - ✅ Works offline with optional local LLM (Ollama)
60
57
  - ✅ All analysis happens on your machine
61
58
 
62
- ## Features
59
+ ## Features & Privacy
63
60
 
64
61
  - **Local-first**: Runs entirely on your machine with no cloud calls or telemetry
65
- - **Impact Assessment**: Detects specific changes to functions, classes, and variables and provides human-readable summaries
66
- - **Two modes**: Fast analysis (non-AI) or deep AI-powered analysis (optional)
67
- - **CLI-first**: `execdiff-git scan` and `execdiff-git scan-ai`
68
- - **Works offline**, no telemetry
62
+ - **Fast Assessment**: Quick symbol detection and impact analysis (always available)
63
+ - **Optional AI Mode**: Deep business-facing analysis using local Ollama (opt-in)
64
+ - **CLI-first**: Simple commands `execdiff-git assess` and `execdiff-git ai-assess`
65
+ - **Zero Dependencies**: Non-AI mode works with just Python and Git
66
+ - **Privacy-focused**: No data sent to external servers
69
67
 
70
68
  ## Installation
71
69
 
@@ -74,121 +72,67 @@ ExecDiff Git AI runs **entirely locally**.
74
72
  - Python 3.8+
75
73
  - Git
76
74
 
77
- ### Initial Setup
78
-
79
- Install from PyPI:
75
+ ### Install Package
80
76
 
81
77
  ```bash
82
78
  pip install execdiff-git-ai
83
79
  ```
84
80
 
85
- That's it! You can now use the non-AI mode immediately.
86
-
87
- ## How to Use
88
-
89
- ### Quick Start (No AI Required)
90
-
91
- 1. **Make your code change** (or let your AI copilot make changes)
92
-
93
- 2. **Stage your changes with git**
94
-
95
- ```bash
96
- git add .
97
- # For new files, you may need:
98
- git add -N .
99
- ```
81
+ ### Optional: Ollama for AI Mode
100
82
 
101
- 3. **Run the assessment**
83
+ For AI-powered analysis, optionally install:
102
84
 
103
- ```bash
104
- execdiff-git scan
105
- ```
85
+ | Component | Size | Purpose |
86
+ |-----------|------|---------|
87
+ | Ollama | ~50MB | Local AI runtime |
88
+ | tinyllama model | ~637MB | AI analysis model |
106
89
 
107
- **Note**: For newly created files, you must run `git add -N .` (intent-to-add) so that `execdiff-git scan` can detect them. This is a git limitation for diff tools.
90
+ **Total: ~700MB (one-time, optional)**
108
91
 
109
- ---
92
+ **Install Ollama:**
110
93
 
111
- ## AI-Powered Assessment (Optional)
112
-
113
- **AI mode is completely optional.** The non-AI mode works great for most use cases.
114
-
115
- ### Requirements for AI Mode
116
-
117
- | Component | Size | Description |
118
- |-----------|------|-------------|
119
- | **Ollama** | ~50MB | Local AI runtime (one-time install) |
120
- | **tinyllama model** | ~637MB | Smallest AI model (one-time download) |
121
-
122
- **Total: ~700MB one-time download**
123
-
124
- - ✅ 100% local - no data sent to cloud
125
- - ✅ Works offline after initial setup
126
- - ✅ User permission required before any downloads
127
-
128
- ### How AI Mode Works
129
-
130
- When you run `execdiff-git scan-ai`:
131
-
132
- 1. **Ollama check** - Checks if Ollama is installed
133
- 2. **Model check** - Checks if AI model is available
134
- 3. **User permission** - Asks before downloading anything
135
- 4. **Auto-start** - Starts Ollama server automatically
136
- 5. **Analysis** - Runs local AI analysis on your changes
137
- 6. **Auto-stop** - Stops Ollama server when done
138
-
139
- ### Install Ollama (One-Time)
140
-
141
- **macOS:**
94
+ macOS:
142
95
  ```bash
143
96
  brew install ollama
144
97
  ```
145
98
 
146
- **macOS/Linux:**
99
+ macOS/Linux:
147
100
  ```bash
148
101
  curl -fsSL https://ollama.ai/install.sh | sh
149
102
  ```
150
103
 
151
- **Or download from:** https://ollama.ai/
152
-
153
- ### Use AI Mode
104
+ Or download from: https://ollama.ai/
154
105
 
155
- Simply run:
106
+ ---
156
107
 
157
- ```bash
158
- execdiff-git scan-ai
159
- ```
108
+ ## Initial Setup
160
109
 
161
- If the AI model is not installed, you'll be asked:
110
+ 1. **Make your code change** (or let your AI copilot make changes)
162
111
 
163
- ```
164
- ⚠️ Model 'tinyllama' (~637MB) is not installed locally.
165
- ✅ Everything stays local - no data is sent to the cloud.
112
+ 2. **Stage your changes with git**
166
113
 
167
- Download 'tinyllama' now? (yes/no):
168
- ```
114
+ ```bash
115
+ git add .
116
+ # For new files, you may need:
117
+ git add -N .
118
+ ```
169
119
 
170
- **Say "yes" to download, or "no" to skip AI analysis.**
120
+ 3. **You're ready to use ExecDiff Git AI!**
171
121
 
172
122
  ---
173
123
 
174
- ## Usage
124
+ ## Quick Assessment (No AI)
175
125
 
176
- ### Basic Commands
126
+ Fast, local symbol detection - no setup required.
177
127
 
178
- **Non-AI mode (fast, always available, no setup):**
179
- ```bash
180
- execdiff-git scan
181
- ```
128
+ ### Usage
182
129
 
183
- **AI mode (optional, requires Ollama ~700MB total):**
184
130
  ```bash
185
- execdiff-git scan-ai
131
+ execdiff-git assess
186
132
  ```
187
133
 
188
134
  ### Example Output
189
135
 
190
- **Non-AI Mode:**
191
-
192
136
  ```
193
137
  ==============================
194
138
  📊 File Change Assessment
@@ -197,19 +141,41 @@ File +Lines -Lines
197
141
  ------------------------------------------------
198
142
  test_feature.py 14 0
199
143
 
144
+ --------------------------------
145
+
200
146
  ================================================================================
201
147
  📋 Impact Summary
202
148
  ================================================================================
203
- Symbol Change Type Impact
149
+ Symbol Change Type Impact
204
150
  --------------------------------------------------------
205
- authenticate_user function added LOW
206
- create_session function added LOW
207
- validate_token function added LOW
151
+ [NEW] authenticate_user function added LOW
152
+ [NEW] create_session function added LOW
153
+ [NEW] validate_token function added LOW
208
154
 
209
155
  ✅ Assessment complete!
210
156
  ```
211
157
 
212
- **AI Mode (with Ollama):**
158
+ ---
159
+
160
+ ## AI-Powered Assessment
161
+
162
+ Deep analysis with business-facing summaries using local Ollama (requires optional Ollama installation).
163
+
164
+ ### Usage
165
+
166
+ ```bash
167
+ execdiff-git ai-assess
168
+ ```
169
+
170
+ The tool will:
171
+ - Check if Ollama is installed
172
+ - Ask permission before downloading AI model (~637MB)
173
+ - Start Ollama server automatically
174
+ - Analyze each change individually
175
+ - Get overall business impact summary
176
+ - Stop Ollama server when done
177
+
178
+ ### Example Output
213
179
 
214
180
  ```
215
181
  ==============================
@@ -219,14 +185,16 @@ File +Lines -Lines
219
185
  ------------------------------------------------
220
186
  test_feature.py 14 0
221
187
 
188
+ --------------------------------
189
+
222
190
  ================================================================================
223
191
  📋 Impact Summary
224
192
  ================================================================================
225
- Symbol Change Type Impact
193
+ Symbol Change Type Impact
226
194
  --------------------------------------------------------
227
- authenticate_user function added LOW
228
- create_session function added LOW
229
- validate_token function added LOW
195
+ [NEW] authenticate_user function added LOW
196
+ [NEW] create_session function added LOW
197
+ [NEW] validate_token function added LOW
230
198
 
231
199
  ================================================================================
232
200
  🤖 AI Impact Assessment
@@ -235,19 +203,27 @@ validate_token function added LOW
235
203
  🚀 Starting Ollama server...
236
204
  ⏳ Waiting for Ollama server to start...
237
205
  ✅ Ollama server is ready!
238
- 🧠 Analyzing with AI (tinyllama, 100% local)...
239
206
 
240
- Symbol: authenticate_user
241
- Impact: MEDIUM
242
- Summary: Added user authentication logic. This affects user access and security.
207
+ 🧠 Analyzing 3 changes:
208
+
209
+ [NEW] authenticate_user...
210
+ Handles user login and credential verification.
243
211
 
244
- Symbol: create_session
245
- Impact: LOW
246
- Summary: Added session creation. Improves user experience and session management.
212
+ [NEW] create_session... ✓
213
+ Establishes user sessions after authentication.
247
214
 
248
- Symbol: validate_token
249
- Impact: LOW
250
- Summary: Added token validation. Enhances security by validating session tokens.
215
+ [NEW] validate_token... ✓
216
+ Verifies tokens are valid and not expired.
217
+
218
+ • Overall impact... ✓
219
+
220
+ Overall:
221
+ • System now provides complete authentication workflow with secure token validation.
222
+
223
+ Changes:
224
+ • [NEW] authenticate_user: Handles user login and credential verification.
225
+ • [NEW] create_session: Establishes user sessions after authentication.
226
+ • [NEW] validate_token: Verifies tokens are valid and not expired.
251
227
 
252
228
  🛑 Ollama server stopped
253
229
 
@@ -256,56 +232,41 @@ Summary: Added token validation. Enhances security by validating session tokens.
256
232
 
257
233
  ---
258
234
 
259
- ## Comparison: Non-AI vs AI Mode
235
+ ## Symbol Change Types
236
+
237
+ Each symbol is labeled with its change type:
260
238
 
261
- | Feature | Non-AI Mode | AI Mode |
262
- |---------|-------------|---------|
263
- | **Setup** | None | Ollama + model (~700MB) |
264
- | **Speed** | Instant | 5-30 seconds |
265
- | **Analysis** | Symbol detection | Business-facing summaries |
266
- | **Privacy** | 100% local | 100% local |
267
- | **Offline** | Yes | Yes (after setup) |
239
+ - **[NEW]** - Newly added function or class
240
+ - **[MODIFIED]** - Existing function or class that was changed
241
+ - **[DELETED]** - Function or class that was removed
268
242
 
269
243
  ---
270
244
 
271
245
  ## How It Works
272
246
 
273
- 1. **Reads git diff** - Gets all staged changes (`git diff --cached`)
247
+ 1. **Reads git diff** - Gets all staged changes
274
248
  2. **Extracts symbols** - Finds functions, classes, and variables
275
- 3. **Detects change type** - Identifies what kind of change was made
276
- 4. **Assesses impact** - Uses local AI (Ollama) if available, or quick heuristics
277
- 5. **Generates business summary** - Specific, non-technical impact summary (AI mode only)
278
- 6. **Advisory warnings** - Critical impact changes trigger warnings (AI mode only)
279
-
280
- ---
249
+ 3. **Detects changes** - Identifies NEW, MODIFIED, or DELETED code
250
+ 4. **Analyzes impact** - AI provides business-facing summaries (AI mode only)
281
251
 
282
252
  ## Development
283
253
 
284
- Install in editable mode:
285
-
286
254
  ```bash
287
255
  git clone https://github.com/anupmoncy/execdiff-git-ai.git
288
256
  cd execdiff-git-ai
289
257
  pip install -e .
258
+ execdiff-git assess
290
259
  ```
291
260
 
292
- Run the CLI:
293
-
294
- ```bash
295
- execdiff-git scan
296
- ```
297
-
298
- ## Programmatic Usage
299
-
300
- You can also use ExecDiff Git AI as a library:
261
+ ## Library Usage
301
262
 
302
263
  ```python
303
264
  from execdiff_git_ai.agent import run_agent, run_agent_with_ai
304
265
 
305
- # Non-AI mode (default)
266
+ # Non-AI mode
306
267
  run_agent()
307
268
 
308
- # AI-powered mode (optional, automatically manages Ollama)
269
+ # AI mode
309
270
  run_agent_with_ai()
310
271
  ```
311
272
 
@@ -323,4 +284,4 @@ Contributions welcome! Please open an issue or submit a pull request.
323
284
 
324
285
  ---
325
286
 
326
- **Note**: This is an early-stage project. The API and behavior are subject to change.
287
+ **Note**: Early-stage project. API and behavior subject to change.
@@ -0,0 +1,244 @@
1
+ # ExecDiff Git AI
2
+
3
+ AI Impact Assessment for git changes - understand what your AI copilot changed before you commit it.
4
+
5
+ ## Intro
6
+
7
+ ExecDiff Git AI is a Python CLI tool that helps developers understand the scope and implications of code changes made by AI coding assistants (like GitHub Copilot, Cursor, or Replit AI). It analyzes git diffs and extracts modified symbols (functions, classes, variables).
8
+
9
+ **100% Local - No Cloud Required**
10
+ - ✅ No code is uploaded
11
+ - ✅ No cloud calls required
12
+ - ✅ No telemetry
13
+ - ✅ Works offline with optional local LLM (Ollama)
14
+ - ✅ All analysis happens on your machine
15
+
16
+ ## Features & Privacy
17
+
18
+ - **Local-first**: Runs entirely on your machine with no cloud calls or telemetry
19
+ - **Fast Assessment**: Quick symbol detection and impact analysis (always available)
20
+ - **Optional AI Mode**: Deep business-facing analysis using local Ollama (opt-in)
21
+ - **CLI-first**: Simple commands `execdiff-git assess` and `execdiff-git ai-assess`
22
+ - **Zero Dependencies**: Non-AI mode works with just Python and Git
23
+ - **Privacy-focused**: No data sent to external servers
24
+
25
+ ## Installation
26
+
27
+ ### Prerequisites (Required)
28
+
29
+ - Python 3.8+
30
+ - Git
31
+
32
+ ### Install Package
33
+
34
+ ```bash
35
+ pip install execdiff-git-ai
36
+ ```
37
+
38
+ ### Optional: Ollama for AI Mode
39
+
40
+ For AI-powered analysis, optionally install:
41
+
42
+ | Component | Size | Purpose |
43
+ |-----------|------|---------|
44
+ | Ollama | ~50MB | Local AI runtime |
45
+ | tinyllama model | ~637MB | AI analysis model |
46
+
47
+ **Total: ~700MB (one-time, optional)**
48
+
49
+ **Install Ollama:**
50
+
51
+ macOS:
52
+ ```bash
53
+ brew install ollama
54
+ ```
55
+
56
+ macOS/Linux:
57
+ ```bash
58
+ curl -fsSL https://ollama.ai/install.sh | sh
59
+ ```
60
+
61
+ Or download from: https://ollama.ai/
62
+
63
+ ---
64
+
65
+ ## Initial Setup
66
+
67
+ 1. **Make your code change** (or let your AI copilot make changes)
68
+
69
+ 2. **Stage your changes with git**
70
+
71
+ ```bash
72
+ git add .
73
+ # For new files, you may need:
74
+ git add -N .
75
+ ```
76
+
77
+ 3. **You're ready to use ExecDiff Git AI!**
78
+
79
+ ---
80
+
81
+ ## Quick Assessment (No AI)
82
+
83
+ Fast, local symbol detection - no setup required.
84
+
85
+ ### Usage
86
+
87
+ ```bash
88
+ execdiff-git assess
89
+ ```
90
+
91
+ ### Example Output
92
+
93
+ ```
94
+ ==============================
95
+ 📊 File Change Assessment
96
+ ==============================
97
+ File +Lines -Lines
98
+ ------------------------------------------------
99
+ test_feature.py 14 0
100
+
101
+ --------------------------------
102
+
103
+ ================================================================================
104
+ 📋 Impact Summary
105
+ ================================================================================
106
+ Symbol Change Type Impact
107
+ --------------------------------------------------------
108
+ [NEW] authenticate_user function added LOW
109
+ [NEW] create_session function added LOW
110
+ [NEW] validate_token function added LOW
111
+
112
+ ✅ Assessment complete!
113
+ ```
114
+
115
+ ---
116
+
117
+ ## AI-Powered Assessment
118
+
119
+ Deep analysis with business-facing summaries using local Ollama (requires optional Ollama installation).
120
+
121
+ ### Usage
122
+
123
+ ```bash
124
+ execdiff-git ai-assess
125
+ ```
126
+
127
+ The tool will:
128
+ - Check if Ollama is installed
129
+ - Ask permission before downloading AI model (~637MB)
130
+ - Start Ollama server automatically
131
+ - Analyze each change individually
132
+ - Get overall business impact summary
133
+ - Stop Ollama server when done
134
+
135
+ ### Example Output
136
+
137
+ ```
138
+ ==============================
139
+ 📊 File Change Assessment
140
+ ==============================
141
+ File +Lines -Lines
142
+ ------------------------------------------------
143
+ test_feature.py 14 0
144
+
145
+ --------------------------------
146
+
147
+ ================================================================================
148
+ 📋 Impact Summary
149
+ ================================================================================
150
+ Symbol Change Type Impact
151
+ --------------------------------------------------------
152
+ [NEW] authenticate_user function added LOW
153
+ [NEW] create_session function added LOW
154
+ [NEW] validate_token function added LOW
155
+
156
+ ================================================================================
157
+ 🤖 AI Impact Assessment
158
+ ================================================================================
159
+
160
+ 🚀 Starting Ollama server...
161
+ ⏳ Waiting for Ollama server to start...
162
+ ✅ Ollama server is ready!
163
+
164
+ 🧠 Analyzing 3 changes:
165
+
166
+ • [NEW] authenticate_user... ✓
167
+ Handles user login and credential verification.
168
+
169
+ • [NEW] create_session... ✓
170
+ Establishes user sessions after authentication.
171
+
172
+ • [NEW] validate_token... ✓
173
+ Verifies tokens are valid and not expired.
174
+
175
+ • Overall impact... ✓
176
+
177
+ Overall:
178
+ • System now provides complete authentication workflow with secure token validation.
179
+
180
+ Changes:
181
+ • [NEW] authenticate_user: Handles user login and credential verification.
182
+ • [NEW] create_session: Establishes user sessions after authentication.
183
+ • [NEW] validate_token: Verifies tokens are valid and not expired.
184
+
185
+ 🛑 Ollama server stopped
186
+
187
+ ✅ Assessment complete!
188
+ ```
189
+
190
+ ---
191
+
192
+ ## Symbol Change Types
193
+
194
+ Each symbol is labeled with its change type:
195
+
196
+ - **[NEW]** - Newly added function or class
197
+ - **[MODIFIED]** - Existing function or class that was changed
198
+ - **[DELETED]** - Function or class that was removed
199
+
200
+ ---
201
+
202
+ ## How It Works
203
+
204
+ 1. **Reads git diff** - Gets all staged changes
205
+ 2. **Extracts symbols** - Finds functions, classes, and variables
206
+ 3. **Detects changes** - Identifies NEW, MODIFIED, or DELETED code
207
+ 4. **Analyzes impact** - AI provides business-facing summaries (AI mode only)
208
+
209
+ ## Development
210
+
211
+ ```bash
212
+ git clone https://github.com/anupmoncy/execdiff-git-ai.git
213
+ cd execdiff-git-ai
214
+ pip install -e .
215
+ execdiff-git assess
216
+ ```
217
+
218
+ ## Library Usage
219
+
220
+ ```python
221
+ from execdiff_git_ai.agent import run_agent, run_agent_with_ai
222
+
223
+ # Non-AI mode
224
+ run_agent()
225
+
226
+ # AI mode
227
+ run_agent_with_ai()
228
+ ```
229
+
230
+ ## License
231
+
232
+ Apache-2.0
233
+
234
+ ## Author
235
+
236
+ Anup Moncy (n93181165@gmail.com)
237
+
238
+ ## Contributing
239
+
240
+ Contributions welcome! Please open an issue or submit a pull request.
241
+
242
+ ---
243
+
244
+ **Note**: Early-stage project. API and behavior subject to change.
@@ -0,0 +1,16 @@
1
+ """
2
+ ExecDiff Git AI - Analyze AI-driven code changes.
3
+
4
+ This package provides tools to analyze Git diffs and assess the impact
5
+ of changes made by AI coding assistants.
6
+ """
7
+
8
+ __version__ = "1.0.2"
9
+ __author__ = "Anup Moncy"
10
+
11
+ try:
12
+ from execdiff_git_ai.agent import run_agent, run_agent_with_ai
13
+ __all__ = ['run_agent', 'run_agent_with_ai']
14
+ except ImportError as e:
15
+ print(f"Warning: Could not import agent functions: {e}")
16
+ __all__ = []