Skip to content
EnvDiff

EnvDiff

Fix your environment. Not your entire system.

Created on 4th April 2026

•

EnvDiff

EnvDiff

Fix your environment. Not your entire system.

The problem EnvDiff solves

Every developer has been here: you need a specific Python or Node version to run one project. You install it. Now three other projects are broken.

You paste the error into Claude or ChatGPT. It gives you five things to try.
None of them work. Because the AI is guessing. It doesn't know what actually changed on your machine.

EnvDiff fixes this two ways:

First, it tells you exactly what's wrong. It keeps a snapshot of your
working environment and when something breaks, it shows you which change caused it. Not five possibilities. The actual cause.

Second, before applying any fix, it saves your current environment as a
restore point. Your app runs. When you're done, one click brings everything back to exactly how it was.

No Docker setup. No config files. No permanently broken system.

It's like Time Machine for your dev environment.

Challenges we ran into

Building EnvDiff wasn't just about calling an LLM our biggest challenges revolved around safety, determinism, and cross-platform execution. If an AI is going to automatically fix a developer's environment, it absolutely cannot break their machine in the process.

Here are the specific hurdles we faced and how we overcame them:

1. The "Don't Break My Machine" Hurdle: Safe Sandboxed Execution
The Challenge: Initial tests revealed a terrifying reality: the AI would frequently generate destructive or global-modifying scripts (e.g., curl | sudo bash, pyenv global, or writing to ~/.bashrc). We couldn’t just pipe raw LLM output into a user's terminal—that defeats the purpose of a helpful tool. The Solution: We engineered a Tangible, Project-Scoped Sandbox Environment. We built an execution interceptor in our VS Code extension that parses the AI's bash/PowerShell scripts before they run. It blocks system-modifying commands and automatically rewrites them into safe, local equivalents (e.g., forcing Python fixes into a .envdiff-sandbox/venv instead of the global interpreter). We made the sandbox visible and verifiable—creating an audit log (sandbox.log) of what was blocked vs. executed, alongside an auto-generated rollback.sh so developers can trust the tool completely.

2. The "Hallucination vs. Action" Dilemma
The Challenge: We found that a single LLM prompt trying to diagnose complex environment diffs (Node versions, OS differences, missing Env Vars, and package mismatches) simultaneously was prone to hallucinations. It would sometimes invent dependencies or suggest fixes that didn't align with the error stack trace. The Solution: We implemented a 3-Persona Consensus Engine. Instead of one generic prompt, the diff is analyzed by three distinct AI personas:

The Node/Frontend Expert
The Python/Backend Expert
The DevOps/Sysadmin Expert The backend aggregates their independently generated fixes, scores them based on the actual error trace, and only returns the highest-confidence, cross-verified solution to the VS Code extension.

3. The "Observer Effect" in Version Detection
The Challenge: We ran into severe cross-platform edge cases while capturing the "Golden" environment. For example, on Windows, querying Python versions using the py launcher inside spawned shell processes was failing due to complex quoting/escaping bugs ("py -3.11" vs py -3.11). This caused golden snapshots to record the wrong system defaults instead of the project-specific requirements. The Solution: We refactored our CLI detectors to act as "smart observers". Instead of blindly running shell commands, the CLI now proactively scans for project markers (like .python-version or .nvmrc) and dynamically restructures how it invokes sub-processes based on the host OS (win32 vs linux). This ensured that the golden snapshot perfectly matches the developer's intended project state, eliminating false-positive diffs across operating systems.

Tracks Applied (1)

Best Use of Gemini API

We use the Gemini API to power a 3-expert consensus engine. Instead of asking one AI to figure everything out, we run t...Read More
Gemini

Gemini

Discussion

Builders also viewed

See more projects on Devfolio