DEV Community

ANUP M
ANUP M

Posted on

Copilot - See What It Changes Before It Breaks Your Project

Monitor AI Copilot Workspace Changes with ExecDiff

Passive execution tracing for file and package changes.

🔗 PyPI: https://pypi.org/project/execdiff/


Monitor AI Tool Workspace Changes

AI coding tools like:

  • GitHub Copilot
  • Cursor
  • Replit AI
  • Agentic workflows

can install dependencies, modify configurations, and run setup commands directly inside your project workspace.


Tracking Changes Beyond Git

If an AI copilot implements a feature like API integration, it may:

  • Generate code
  • Install libraries via the terminal
  • Modify configuration files
  • Create output files

But when something breaks after execution, Git only shows code changes — not:

  • newly installed packages
  • runtime-created files
  • deleted files
  • config updates done during execution

So it’s hard to tell what actually changed after an AI copilot action.


Here’s how to capture everything automatically using VS Code (or any IDE with a terminal).


Step 1: Open Your Project in Your IDE

Open your project folder in VS Code (or any IDE).

Now open the integrated terminal:

Terminal → New Terminal


Step 2 (Optional): Create a Project-Level Python Environment

If you want installs isolated to this project:

python3 -m venv venv
source venv/bin/activate
Enter fullscreen mode Exit fullscreen mode

Otherwise, you can skip this step.


Step 3: Install ExecDiff from Terminal

Run this inside the terminal:

pip install execdiff
Enter fullscreen mode Exit fullscreen mode

Step 4: Start Tracing Using the CLI

You can now use the built-in CLI to trace your workspace changes:

execdiff trace
Enter fullscreen mode Exit fullscreen mode

You will see:

Tracing is ON. Use your AI copilot now.
Enter fullscreen mode Exit fullscreen mode

Leave this terminal running while you use your AI copilot or make changes in your project.


Step 5: Use Your AI Copilot Normally

Now continue development normally inside your IDE using any AI copilot.

For example, ask:

"Create a new feature for loading hello world into a pandas data frame and displaying it. Install the required libraries"

Your copilot may now:

  • generate new code
  • install dependencies
  • modify config files
  • create or delete files

inside your project workspace.

You don’t need to change anything in your workflow.

Just let your AI copilot run whatever setup it needs internally.


Step 6: Stop the Trace

Once it’s done, come back to terminal and press:

ENTER
Enter fullscreen mode Exit fullscreen mode

You’ll get:

Summary of last AI action:

Created:
- output.txt
- data.json

Modified:
- settings.py

Installed:
- requests==2.32.0
Enter fullscreen mode Exit fullscreen mode

This includes:

  • filesystem changes
  • installed packages
  • deleted files
  • execution-time config updates

All changes made during runtime.


Automatic Logs

Each AI-driven action is also stored inside:

.execdiff/logs/actions.jsonl
Enter fullscreen mode Exit fullscreen mode

Now get a running history of what changed in your project after every AI action.

You can now continue using any AI copilot inside VS Code (or any IDE) normally — while ExecDiff captures everything it changes behind the scenes.


How to Start Using

pip install execdiff
Enter fullscreen mode Exit fullscreen mode

Originally published on Medium: here

Top comments (0)