execdiff 0.0.4__tar.gz → 0.0.6__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,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: execdiff
3
- Version: 0.0.4
3
+ Version: 0.0.6
4
4
  Summary: Passive execution tracing for file and package changes.
5
- Author-email: Your Name <your@email.com>
5
+ Author-email: Anup Moncy <n93181165@gmail.com>
6
6
  License: Apache License
7
7
  Version 2.0, January 2004
8
8
  http://www.apache.org/licenses/
@@ -205,66 +205,68 @@ License: Apache License
205
205
  See the License for the specific language governing permissions and
206
206
  limitations under the License.
207
207
 
208
+ Classifier: License :: OSI Approved :: Apache Software License
209
+ Classifier: Programming Language :: Python :: 3
210
+ Classifier: Programming Language :: Python :: 3.8
211
+ Classifier: Programming Language :: Python :: 3.9
212
+ Classifier: Programming Language :: Python :: 3.10
213
+ Classifier: Programming Language :: Python :: 3.11
214
+ Classifier: Programming Language :: Python :: 3.12
208
215
  Requires-Python: >=3.8
209
216
  Description-Content-Type: text/markdown
210
217
  License-File: LICENSE
211
218
  Dynamic: license-file
212
219
 
213
- # ExecDiff
220
+ # Monitor AI Tool Workspace Changes
214
221
 
215
- See what AI-generated code will change before running it.
222
+ AI coding tools like GitHub Copilot, Cursor, Replit AI, and agentic workflows install dependencies, modify configurations, and run setup commands in a project workspace.
216
223
 
217
- ---
224
+ ## Tracking Changes Beyond Git
218
225
 
219
- ## Problem
226
+ If GitHub Copilot implements a feature like API integration, it may:
220
227
 
221
- AI coding tools and agents today can:
228
+ - Generate code.
229
+ - Install libraries via the terminal.
230
+ - Modify configuration files.
231
+ - Create output files.
222
232
 
223
- - install dependencies
224
- - create files
225
- - modify configs
226
- - run migrations
227
- - delete project files
233
+ But when something breaks after execution, Git only shows code changes — not:
228
234
 
229
- All automatically.
235
+ - newly installed packages
236
+ - runtime-created files
237
+ - deleted files
238
+ - config updates done during execution
230
239
 
231
- When something breaks after execution, tools cannot answer:
240
+ So it’s hard to tell what actually changed after an AI copilot action.
232
241
 
233
- > What exactly changed because of this action?
242
+ Here’s how to capture everything automatically using VS Code (or any IDE with a terminal).
234
243
 
235
- Git tracks source code changes —
236
- but it does **not** track execution side effects like:
244
+ ---
237
245
 
238
- - newly installed Python packages
239
- - runtime-created files
240
- - deleted files
241
- - modified configs
246
+ ## Step 1: Open Your Project in Your IDE
242
247
 
243
- So tools often fall back to:
248
+ Open your project folder in VS Code (or any IDE).
244
249
 
245
- > regenerate and try again
250
+ Now open the integrated terminal: **Terminal → New Terminal**
246
251
 
247
252
  ---
248
253
 
249
- ## Solution
250
-
251
- ExecDiff allows tools to run AI-generated code and observe:
254
+ ## Step 2 (Optional): Create a Project-Level Python Environment
252
255
 
253
- > what changed in the workspace because of that execution
256
+ If you want installs isolated to this project:
254
257
 
255
- It detects:
256
-
257
- - files created
258
- - files modified
259
- - files deleted
260
- - Python packages installed
258
+ ```bash
259
+ python3 -m venv venv
260
+ source venv/bin/activate
261
+ ```
261
262
 
262
- inside a specific workspace
263
- during a specific execution window.
263
+ Otherwise, you can skip this step.
264
264
 
265
265
  ---
266
266
 
267
- ## Installation
267
+ ## Step 3: Install ExecDiff from Terminal
268
+
269
+ Run this inside the terminal:
268
270
 
269
271
  ```bash
270
272
  pip install execdiff
@@ -272,134 +274,106 @@ pip install execdiff
272
274
 
273
275
  ---
274
276
 
275
- ## Example
277
+ ## Step 4: Start Tracing Before Using Your AI Copilot
276
278
 
277
- Create a test script:
279
+ Create a new Python file in your project: `trace_ai.py` with the code below
278
280
 
279
281
  ```python
280
282
  import execdiff
281
- import json
282
- import os
283
+ import time
284
+
285
+ print("\nStarting AI action trace...\n")
286
+ execdiff.start_action_trace(workspace=".")
283
287
 
284
- os.makedirs("workspace", exist_ok=True)
288
+ input("Tracing is ON. Use your AI copilot now.\n\nPress ENTER here once it's done...")
285
289
 
286
- diff = execdiff.run_traced(
287
- "touch workspace/test.txt",
288
- workspace="workspace"
289
- )
290
+ print("\nStopping trace...\n")
291
+ execdiff.stop_action_trace()
290
292
 
291
- print(json.dumps(diff, indent=2))
293
+ print("\nSummary of last AI action:\n")
294
+ print(execdiff.last_action_summary())
292
295
  ```
293
296
 
294
- Run:
297
+ Now run this from the terminal:
295
298
 
296
299
  ```bash
297
- python test.py
300
+ python trace_ai.py
298
301
  ```
299
302
 
303
+ Tracing has now started and you’ll see:
304
+
305
+ ```
306
+ Starting AI action trace...
307
+
308
+ Tracing is ON. Use your AI copilot now.
309
+ Press ENTER here once it's done...
310
+ ```
311
+
312
+ Leave this terminal running.
313
+
300
314
  ---
301
315
 
302
- ## API Reference
316
+ ## Step 5: Use Your AI Copilot Normally
303
317
 
304
- ### `start_action_trace(workspace=".")`
318
+ Now continue development normally inside your IDE using any AI copilot.
305
319
 
306
- Start tracing a workspace for changes. Must be called before any operations.
320
+ For example, ask:
307
321
 
308
- ```python
309
- import execdiff
322
+ > “Create a new feature for loading hello world into a pandas data frame and displaying it. Install the required libraries”
310
323
 
311
- execdiff.start_action_trace(workspace="./my_workspace")
312
- # ... your code that makes changes ...
313
- ```
324
+ Your copilot may now:
314
325
 
315
- ### `stop_action_trace()`
326
+ - generate new code
327
+ - install dependencies
328
+ - modify config files
329
+ - create or delete files
316
330
 
317
- Stop tracing and return a diff of all changes detected. Automatically logs to `.execdiff/logs/actions.jsonl`.
331
+ inside your project workspace.
318
332
 
319
- ```python
320
- diff = execdiff.stop_action_trace()
321
- # Returns: {"files": {...}, "packages": {...}}
322
- ```
333
+ You don’t need to change anything in your workflow.
323
334
 
324
- ### `last_action_summary(workspace=".")`
335
+ Just let your AI copilot run whatever setup it needs internally.
325
336
 
326
- Get a human-readable summary of the last action trace without parsing JSON.
337
+ ---
327
338
 
328
- ```python
329
- summary = execdiff.last_action_summary(workspace=".")
330
- print(summary)
331
- ```
339
+ ## Step 6: Stop the Trace
332
340
 
333
- Output example:
334
- ```
335
- Last AI Action:
341
+ Once it’s done, come back to terminal and press Enter
342
+
343
+ You’ll get:
336
344
 
345
+ ```
346
+ Summary of last AI action:
337
347
  Created:
338
348
  - output.txt
339
349
  - data.json
340
-
350
+ Modified:
351
+ - settings.py
341
352
  Installed:
342
353
  - requests==2.32.0
343
354
  ```
344
355
 
345
- ### `snapshot_workspace_state(workspace)`
356
+ This includes:
346
357
 
347
- Take a full metadata snapshot of the workspace (files with mtime/size, installed packages).
358
+ - filesystem changes
359
+ - installed packages
360
+ - deleted files
361
+ - execution-time config updates
348
362
 
349
- ```python
350
- state = execdiff.snapshot_workspace_state(workspace=".")
351
- # Returns: {"files": {...}, "packages": {...}}
352
- ```
363
+ All changes made during runtime.
353
364
 
354
365
  ---
355
366
 
356
- ## Output Format
357
-
358
- ### Diff Structure
359
-
360
- ```json
361
- {
362
- "files": {
363
- "created": [{"path": "file.txt", "mtime": 123.45, "size": 1024}],
364
- "modified": [{"path": "config.yaml", "before_mtime": 123, "after_mtime": 124, "before_size": 512, "after_size": 1024}],
365
- "deleted": [{"path": "old_file.txt", "mtime": 123.45, "size": 256}]
366
- },
367
- "packages": {
368
- "installed": [{"name": "requests", "version": "2.32.0"}],
369
- "upgraded": [{"name": "django", "before_version": "3.2", "after_version": "4.0"}],
370
- "removed": [{"name": "deprecated_lib", "version": "1.0"}]
371
- }
372
- }
373
- ```
374
-
375
- ### Log File
367
+ ## Automatic Logs
376
368
 
377
- All action traces are automatically persisted to `.execdiff/logs/actions.jsonl`:
369
+ Each AI-driven action is also stored inside:
378
370
 
379
- ```json
380
- {
381
- "timestamp": "2026-02-18T18:19:35.872838",
382
- "workspace": "/path/to/workspace",
383
- "diff": {...}
384
- }
371
+ ```
372
+ .execdiff/logs/actions.jsonl
385
373
  ```
386
374
 
387
- ---
388
-
389
- ## Use Cases
390
-
391
- ExecDiff can help AI coding tools:
392
-
393
- - preview changes before applying generated code
394
- - detect unintended file or dependency changes
395
- - explain execution impact to users
396
- - debug failed automation
397
- - build undo / rollback systems
375
+ Now get a running history of what changed in your project after every AI action.
398
376
 
399
377
  ---
400
378
 
401
- ## License
402
-
403
- MIT
404
-
405
- ````
379
+ You can now continue using any AI copilot inside VS Code (or any IDE) normally while ExecDiff captures everything it changes behind the scenes.
@@ -0,0 +1,160 @@
1
+ # Monitor AI Tool Workspace Changes
2
+
3
+ AI coding tools like GitHub Copilot, Cursor, Replit AI, and agentic workflows install dependencies, modify configurations, and run setup commands in a project workspace.
4
+
5
+ ## Tracking Changes Beyond Git
6
+
7
+ If GitHub Copilot implements a feature like API integration, it may:
8
+
9
+ - Generate code.
10
+ - Install libraries via the terminal.
11
+ - Modify configuration files.
12
+ - Create output files.
13
+
14
+ But when something breaks after execution, Git only shows code changes — not:
15
+
16
+ - newly installed packages
17
+ - runtime-created files
18
+ - deleted files
19
+ - config updates done during execution
20
+
21
+ So it’s hard to tell what actually changed after an AI copilot action.
22
+
23
+ Here’s how to capture everything automatically using VS Code (or any IDE with a terminal).
24
+
25
+ ---
26
+
27
+ ## Step 1: Open Your Project in Your IDE
28
+
29
+ Open your project folder in VS Code (or any IDE).
30
+
31
+ Now open the integrated terminal: **Terminal → New Terminal**
32
+
33
+ ---
34
+
35
+ ## Step 2 (Optional): Create a Project-Level Python Environment
36
+
37
+ If you want installs isolated to this project:
38
+
39
+ ```bash
40
+ python3 -m venv venv
41
+ source venv/bin/activate
42
+ ```
43
+
44
+ Otherwise, you can skip this step.
45
+
46
+ ---
47
+
48
+ ## Step 3: Install ExecDiff from Terminal
49
+
50
+ Run this inside the terminal:
51
+
52
+ ```bash
53
+ pip install execdiff
54
+ ```
55
+
56
+ ---
57
+
58
+ ## Step 4: Start Tracing Before Using Your AI Copilot
59
+
60
+ Create a new Python file in your project: `trace_ai.py` with the code below
61
+
62
+ ```python
63
+ import execdiff
64
+ import time
65
+
66
+ print("\nStarting AI action trace...\n")
67
+ execdiff.start_action_trace(workspace=".")
68
+
69
+ input("Tracing is ON. Use your AI copilot now.\n\nPress ENTER here once it's done...")
70
+
71
+ print("\nStopping trace...\n")
72
+ execdiff.stop_action_trace()
73
+
74
+ print("\nSummary of last AI action:\n")
75
+ print(execdiff.last_action_summary())
76
+ ```
77
+
78
+ Now run this from the terminal:
79
+
80
+ ```bash
81
+ python trace_ai.py
82
+ ```
83
+
84
+ Tracing has now started and you’ll see:
85
+
86
+ ```
87
+ Starting AI action trace...
88
+
89
+ Tracing is ON. Use your AI copilot now.
90
+ Press ENTER here once it's done...
91
+ ```
92
+
93
+ Leave this terminal running.
94
+
95
+ ---
96
+
97
+ ## Step 5: Use Your AI Copilot Normally
98
+
99
+ Now continue development normally inside your IDE using any AI copilot.
100
+
101
+ For example, ask:
102
+
103
+ > “Create a new feature for loading hello world into a pandas data frame and displaying it. Install the required libraries”
104
+
105
+ Your copilot may now:
106
+
107
+ - generate new code
108
+ - install dependencies
109
+ - modify config files
110
+ - create or delete files
111
+
112
+ inside your project workspace.
113
+
114
+ You don’t need to change anything in your workflow.
115
+
116
+ Just let your AI copilot run whatever setup it needs internally.
117
+
118
+ ---
119
+
120
+ ## Step 6: Stop the Trace
121
+
122
+ Once it’s done, come back to terminal and press Enter
123
+
124
+ You’ll get:
125
+
126
+ ```
127
+ Summary of last AI action:
128
+ Created:
129
+ - output.txt
130
+ - data.json
131
+ Modified:
132
+ - settings.py
133
+ Installed:
134
+ - requests==2.32.0
135
+ ```
136
+
137
+ This includes:
138
+
139
+ - filesystem changes
140
+ - installed packages
141
+ - deleted files
142
+ - execution-time config updates
143
+
144
+ All changes made during runtime.
145
+
146
+ ---
147
+
148
+ ## Automatic Logs
149
+
150
+ Each AI-driven action is also stored inside:
151
+
152
+ ```
153
+ .execdiff/logs/actions.jsonl
154
+ ```
155
+
156
+ Now get a running history of what changed in your project after every AI action.
157
+
158
+ ---
159
+
160
+ You can now continue using any AI copilot inside VS Code (or any IDE) normally while ExecDiff captures everything it changes behind the scenes.
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: execdiff
3
- Version: 0.0.4
3
+ Version: 0.0.6
4
4
  Summary: Passive execution tracing for file and package changes.
5
- Author-email: Your Name <your@email.com>
5
+ Author-email: Anup Moncy <n93181165@gmail.com>
6
6
  License: Apache License
7
7
  Version 2.0, January 2004
8
8
  http://www.apache.org/licenses/
@@ -205,66 +205,68 @@ License: Apache License
205
205
  See the License for the specific language governing permissions and
206
206
  limitations under the License.
207
207
 
208
+ Classifier: License :: OSI Approved :: Apache Software License
209
+ Classifier: Programming Language :: Python :: 3
210
+ Classifier: Programming Language :: Python :: 3.8
211
+ Classifier: Programming Language :: Python :: 3.9
212
+ Classifier: Programming Language :: Python :: 3.10
213
+ Classifier: Programming Language :: Python :: 3.11
214
+ Classifier: Programming Language :: Python :: 3.12
208
215
  Requires-Python: >=3.8
209
216
  Description-Content-Type: text/markdown
210
217
  License-File: LICENSE
211
218
  Dynamic: license-file
212
219
 
213
- # ExecDiff
220
+ # Monitor AI Tool Workspace Changes
214
221
 
215
- See what AI-generated code will change before running it.
222
+ AI coding tools like GitHub Copilot, Cursor, Replit AI, and agentic workflows install dependencies, modify configurations, and run setup commands in a project workspace.
216
223
 
217
- ---
224
+ ## Tracking Changes Beyond Git
218
225
 
219
- ## Problem
226
+ If GitHub Copilot implements a feature like API integration, it may:
220
227
 
221
- AI coding tools and agents today can:
228
+ - Generate code.
229
+ - Install libraries via the terminal.
230
+ - Modify configuration files.
231
+ - Create output files.
222
232
 
223
- - install dependencies
224
- - create files
225
- - modify configs
226
- - run migrations
227
- - delete project files
233
+ But when something breaks after execution, Git only shows code changes — not:
228
234
 
229
- All automatically.
235
+ - newly installed packages
236
+ - runtime-created files
237
+ - deleted files
238
+ - config updates done during execution
230
239
 
231
- When something breaks after execution, tools cannot answer:
240
+ So it’s hard to tell what actually changed after an AI copilot action.
232
241
 
233
- > What exactly changed because of this action?
242
+ Here’s how to capture everything automatically using VS Code (or any IDE with a terminal).
234
243
 
235
- Git tracks source code changes —
236
- but it does **not** track execution side effects like:
244
+ ---
237
245
 
238
- - newly installed Python packages
239
- - runtime-created files
240
- - deleted files
241
- - modified configs
246
+ ## Step 1: Open Your Project in Your IDE
242
247
 
243
- So tools often fall back to:
248
+ Open your project folder in VS Code (or any IDE).
244
249
 
245
- > regenerate and try again
250
+ Now open the integrated terminal: **Terminal → New Terminal**
246
251
 
247
252
  ---
248
253
 
249
- ## Solution
250
-
251
- ExecDiff allows tools to run AI-generated code and observe:
254
+ ## Step 2 (Optional): Create a Project-Level Python Environment
252
255
 
253
- > what changed in the workspace because of that execution
256
+ If you want installs isolated to this project:
254
257
 
255
- It detects:
256
-
257
- - files created
258
- - files modified
259
- - files deleted
260
- - Python packages installed
258
+ ```bash
259
+ python3 -m venv venv
260
+ source venv/bin/activate
261
+ ```
261
262
 
262
- inside a specific workspace
263
- during a specific execution window.
263
+ Otherwise, you can skip this step.
264
264
 
265
265
  ---
266
266
 
267
- ## Installation
267
+ ## Step 3: Install ExecDiff from Terminal
268
+
269
+ Run this inside the terminal:
268
270
 
269
271
  ```bash
270
272
  pip install execdiff
@@ -272,134 +274,106 @@ pip install execdiff
272
274
 
273
275
  ---
274
276
 
275
- ## Example
277
+ ## Step 4: Start Tracing Before Using Your AI Copilot
276
278
 
277
- Create a test script:
279
+ Create a new Python file in your project: `trace_ai.py` with the code below
278
280
 
279
281
  ```python
280
282
  import execdiff
281
- import json
282
- import os
283
+ import time
284
+
285
+ print("\nStarting AI action trace...\n")
286
+ execdiff.start_action_trace(workspace=".")
283
287
 
284
- os.makedirs("workspace", exist_ok=True)
288
+ input("Tracing is ON. Use your AI copilot now.\n\nPress ENTER here once it's done...")
285
289
 
286
- diff = execdiff.run_traced(
287
- "touch workspace/test.txt",
288
- workspace="workspace"
289
- )
290
+ print("\nStopping trace...\n")
291
+ execdiff.stop_action_trace()
290
292
 
291
- print(json.dumps(diff, indent=2))
293
+ print("\nSummary of last AI action:\n")
294
+ print(execdiff.last_action_summary())
292
295
  ```
293
296
 
294
- Run:
297
+ Now run this from the terminal:
295
298
 
296
299
  ```bash
297
- python test.py
300
+ python trace_ai.py
298
301
  ```
299
302
 
303
+ Tracing has now started and you’ll see:
304
+
305
+ ```
306
+ Starting AI action trace...
307
+
308
+ Tracing is ON. Use your AI copilot now.
309
+ Press ENTER here once it's done...
310
+ ```
311
+
312
+ Leave this terminal running.
313
+
300
314
  ---
301
315
 
302
- ## API Reference
316
+ ## Step 5: Use Your AI Copilot Normally
303
317
 
304
- ### `start_action_trace(workspace=".")`
318
+ Now continue development normally inside your IDE using any AI copilot.
305
319
 
306
- Start tracing a workspace for changes. Must be called before any operations.
320
+ For example, ask:
307
321
 
308
- ```python
309
- import execdiff
322
+ > “Create a new feature for loading hello world into a pandas data frame and displaying it. Install the required libraries”
310
323
 
311
- execdiff.start_action_trace(workspace="./my_workspace")
312
- # ... your code that makes changes ...
313
- ```
324
+ Your copilot may now:
314
325
 
315
- ### `stop_action_trace()`
326
+ - generate new code
327
+ - install dependencies
328
+ - modify config files
329
+ - create or delete files
316
330
 
317
- Stop tracing and return a diff of all changes detected. Automatically logs to `.execdiff/logs/actions.jsonl`.
331
+ inside your project workspace.
318
332
 
319
- ```python
320
- diff = execdiff.stop_action_trace()
321
- # Returns: {"files": {...}, "packages": {...}}
322
- ```
333
+ You don’t need to change anything in your workflow.
323
334
 
324
- ### `last_action_summary(workspace=".")`
335
+ Just let your AI copilot run whatever setup it needs internally.
325
336
 
326
- Get a human-readable summary of the last action trace without parsing JSON.
337
+ ---
327
338
 
328
- ```python
329
- summary = execdiff.last_action_summary(workspace=".")
330
- print(summary)
331
- ```
339
+ ## Step 6: Stop the Trace
332
340
 
333
- Output example:
334
- ```
335
- Last AI Action:
341
+ Once it’s done, come back to terminal and press Enter
342
+
343
+ You’ll get:
336
344
 
345
+ ```
346
+ Summary of last AI action:
337
347
  Created:
338
348
  - output.txt
339
349
  - data.json
340
-
350
+ Modified:
351
+ - settings.py
341
352
  Installed:
342
353
  - requests==2.32.0
343
354
  ```
344
355
 
345
- ### `snapshot_workspace_state(workspace)`
356
+ This includes:
346
357
 
347
- Take a full metadata snapshot of the workspace (files with mtime/size, installed packages).
358
+ - filesystem changes
359
+ - installed packages
360
+ - deleted files
361
+ - execution-time config updates
348
362
 
349
- ```python
350
- state = execdiff.snapshot_workspace_state(workspace=".")
351
- # Returns: {"files": {...}, "packages": {...}}
352
- ```
363
+ All changes made during runtime.
353
364
 
354
365
  ---
355
366
 
356
- ## Output Format
357
-
358
- ### Diff Structure
359
-
360
- ```json
361
- {
362
- "files": {
363
- "created": [{"path": "file.txt", "mtime": 123.45, "size": 1024}],
364
- "modified": [{"path": "config.yaml", "before_mtime": 123, "after_mtime": 124, "before_size": 512, "after_size": 1024}],
365
- "deleted": [{"path": "old_file.txt", "mtime": 123.45, "size": 256}]
366
- },
367
- "packages": {
368
- "installed": [{"name": "requests", "version": "2.32.0"}],
369
- "upgraded": [{"name": "django", "before_version": "3.2", "after_version": "4.0"}],
370
- "removed": [{"name": "deprecated_lib", "version": "1.0"}]
371
- }
372
- }
373
- ```
374
-
375
- ### Log File
367
+ ## Automatic Logs
376
368
 
377
- All action traces are automatically persisted to `.execdiff/logs/actions.jsonl`:
369
+ Each AI-driven action is also stored inside:
378
370
 
379
- ```json
380
- {
381
- "timestamp": "2026-02-18T18:19:35.872838",
382
- "workspace": "/path/to/workspace",
383
- "diff": {...}
384
- }
371
+ ```
372
+ .execdiff/logs/actions.jsonl
385
373
  ```
386
374
 
387
- ---
388
-
389
- ## Use Cases
390
-
391
- ExecDiff can help AI coding tools:
392
-
393
- - preview changes before applying generated code
394
- - detect unintended file or dependency changes
395
- - explain execution impact to users
396
- - debug failed automation
397
- - build undo / rollback systems
375
+ Now get a running history of what changed in your project after every AI action.
398
376
 
399
377
  ---
400
378
 
401
- ## License
402
-
403
- MIT
404
-
405
- ````
379
+ You can now continue using any AI copilot inside VS Code (or any IDE) normally while ExecDiff captures everything it changes behind the scenes.
@@ -0,0 +1,28 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "execdiff"
7
+ version = "0.0.6"
8
+ description = "Passive execution tracing for file and package changes."
9
+ readme = "README.md"
10
+ license = { file = "LICENSE" }
11
+ authors = [
12
+ { name = "Anup Moncy", email = "n93181165@gmail.com" }
13
+ ]
14
+ requires-python = ">=3.8"
15
+
16
+ classifiers = [
17
+ "License :: OSI Approved :: Apache Software License",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3.8",
20
+ "Programming Language :: Python :: 3.9",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12"
24
+ ]
25
+
26
+ [tool.setuptools.packages.find]
27
+ where = ["."]
28
+ include = ["execdiff*"]
execdiff-0.0.4/README.md DELETED
@@ -1,193 +0,0 @@
1
- # ExecDiff
2
-
3
- See what AI-generated code will change before running it.
4
-
5
- ---
6
-
7
- ## Problem
8
-
9
- AI coding tools and agents today can:
10
-
11
- - install dependencies
12
- - create files
13
- - modify configs
14
- - run migrations
15
- - delete project files
16
-
17
- All automatically.
18
-
19
- When something breaks after execution, tools cannot answer:
20
-
21
- > What exactly changed because of this action?
22
-
23
- Git tracks source code changes —
24
- but it does **not** track execution side effects like:
25
-
26
- - newly installed Python packages
27
- - runtime-created files
28
- - deleted files
29
- - modified configs
30
-
31
- So tools often fall back to:
32
-
33
- > regenerate and try again
34
-
35
- ---
36
-
37
- ## Solution
38
-
39
- ExecDiff allows tools to run AI-generated code and observe:
40
-
41
- > what changed in the workspace because of that execution
42
-
43
- It detects:
44
-
45
- - files created
46
- - files modified
47
- - files deleted
48
- - Python packages installed
49
-
50
- inside a specific workspace
51
- during a specific execution window.
52
-
53
- ---
54
-
55
- ## Installation
56
-
57
- ```bash
58
- pip install execdiff
59
- ```
60
-
61
- ---
62
-
63
- ## Example
64
-
65
- Create a test script:
66
-
67
- ```python
68
- import execdiff
69
- import json
70
- import os
71
-
72
- os.makedirs("workspace", exist_ok=True)
73
-
74
- diff = execdiff.run_traced(
75
- "touch workspace/test.txt",
76
- workspace="workspace"
77
- )
78
-
79
- print(json.dumps(diff, indent=2))
80
- ```
81
-
82
- Run:
83
-
84
- ```bash
85
- python test.py
86
- ```
87
-
88
- ---
89
-
90
- ## API Reference
91
-
92
- ### `start_action_trace(workspace=".")`
93
-
94
- Start tracing a workspace for changes. Must be called before any operations.
95
-
96
- ```python
97
- import execdiff
98
-
99
- execdiff.start_action_trace(workspace="./my_workspace")
100
- # ... your code that makes changes ...
101
- ```
102
-
103
- ### `stop_action_trace()`
104
-
105
- Stop tracing and return a diff of all changes detected. Automatically logs to `.execdiff/logs/actions.jsonl`.
106
-
107
- ```python
108
- diff = execdiff.stop_action_trace()
109
- # Returns: {"files": {...}, "packages": {...}}
110
- ```
111
-
112
- ### `last_action_summary(workspace=".")`
113
-
114
- Get a human-readable summary of the last action trace without parsing JSON.
115
-
116
- ```python
117
- summary = execdiff.last_action_summary(workspace=".")
118
- print(summary)
119
- ```
120
-
121
- Output example:
122
- ```
123
- Last AI Action:
124
-
125
- Created:
126
- - output.txt
127
- - data.json
128
-
129
- Installed:
130
- - requests==2.32.0
131
- ```
132
-
133
- ### `snapshot_workspace_state(workspace)`
134
-
135
- Take a full metadata snapshot of the workspace (files with mtime/size, installed packages).
136
-
137
- ```python
138
- state = execdiff.snapshot_workspace_state(workspace=".")
139
- # Returns: {"files": {...}, "packages": {...}}
140
- ```
141
-
142
- ---
143
-
144
- ## Output Format
145
-
146
- ### Diff Structure
147
-
148
- ```json
149
- {
150
- "files": {
151
- "created": [{"path": "file.txt", "mtime": 123.45, "size": 1024}],
152
- "modified": [{"path": "config.yaml", "before_mtime": 123, "after_mtime": 124, "before_size": 512, "after_size": 1024}],
153
- "deleted": [{"path": "old_file.txt", "mtime": 123.45, "size": 256}]
154
- },
155
- "packages": {
156
- "installed": [{"name": "requests", "version": "2.32.0"}],
157
- "upgraded": [{"name": "django", "before_version": "3.2", "after_version": "4.0"}],
158
- "removed": [{"name": "deprecated_lib", "version": "1.0"}]
159
- }
160
- }
161
- ```
162
-
163
- ### Log File
164
-
165
- All action traces are automatically persisted to `.execdiff/logs/actions.jsonl`:
166
-
167
- ```json
168
- {
169
- "timestamp": "2026-02-18T18:19:35.872838",
170
- "workspace": "/path/to/workspace",
171
- "diff": {...}
172
- }
173
- ```
174
-
175
- ---
176
-
177
- ## Use Cases
178
-
179
- ExecDiff can help AI coding tools:
180
-
181
- - preview changes before applying generated code
182
- - detect unintended file or dependency changes
183
- - explain execution impact to users
184
- - debug failed automation
185
- - build undo / rollback systems
186
-
187
- ---
188
-
189
- ## License
190
-
191
- MIT
192
-
193
- ````
@@ -1,18 +0,0 @@
1
- [build-system]
2
- requires = ["setuptools>=61.0"]
3
- build-backend = "setuptools.build_meta"
4
-
5
- [project]
6
- name = "execdiff"
7
- version = "0.0.4"
8
- description = "Passive execution tracing for file and package changes."
9
- readme = "README.md"
10
- license = { file = "LICENSE" }
11
- authors = [
12
- { name = "Your Name", email = "your@email.com" }
13
- ]
14
- requires-python = ">=3.8"
15
-
16
- [tool.setuptools.packages.find]
17
- where = ["."]
18
- include = ["execdiff*"]
File without changes
File without changes
File without changes