Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>CodePilotGuardian AINew to Visual Studio Code? Get it now.
CodePilotGuardian AI

CodePilotGuardian AI

Parv Upadhyay

|
2 installs
| (0) | Free
AI-driven bug detection, root cause analysis, quick fixes, and validation in VS Code. Supports Python, JavaScript, TypeScript, JSX, TSX, Java, C, C++, and Go.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CodePilotGuardian AI

CodePilotGuardian AI brings AI-powered bug detection, root cause analysis, and automated fix validation right inside VS Code.

CodePilotGuardian AI


✨ Features

Feature Description
🔍 Real-time Bug Detection Analyzes code as you type (600ms debounce) — no manual triggers
🧠 Intelligent Root Cause Analysis Explains why a bug exists, not just where
🔧 Automated Fix Synthesis AI generates a minimal, targeted fix for each bug
✅ Closed-Loop Validation Fix is tested in a sandboxed environment before you see it
👁️ Fix Diff Preview See exactly what changes before applying
⚡ One-Click Apply Apply the verified fix directly into your editor
🧪 Regression Test Generation Auto-generates pytest tests to catch the bug in CI
📊 Team Insights Aggregated bug patterns and fix acceptance rates for your team
👍 Feedback Loop Thumbs up/down on suggestions — system adapts over time

Supported Languages

  • Python (.py) — AST analysis and syntax diagnostics
  • JavaScript / JSX (.js, .jsx) — syntax, security, and code quality rules
  • TypeScript / TSX (.ts, .tsx) — syntax, security, and code quality rules
  • Java, C, C++, and Go — syntax and cross-language static rules

Coverage is parser syntax plus curated static rules; language servers and compilers remain the source for framework and type-checking diagnostics.

  • Learning and Technical modes, session summaries, and workspace team insights

🚀 Getting Started

Step 1: Start the CodePilotGuardian AI Backend

This extension requires the CodePilotGuardian AI backend (Python/FastAPI) running locally.

Quick start:

# Clone the full repository
git clone https://github.com/codeguardian-ai/codeguardian-vscode.git
cd codeguardian-vscode

# Create a virtual environment and install the backend from the repository root
python -m venv .venv
# Windows PowerShell:
.\.venv\Scripts\python.exe -m pip install -e .
# macOS/Linux:
# .venv/bin/python -m pip install -e .

# (Optional) Add your Gemini API key to .env for live AI
# AI_PROVIDER=gemini
# GEMINI_API_KEY=your-key-here

# Start the backend from the repository root (Windows PowerShell)
.\.venv\Scripts\python.exe -m uvicorn backend.main:app --host 127.0.0.1 --port 8000
# macOS/Linux:
# .venv/bin/python -m uvicorn backend.main:app --host 127.0.0.1 --port 8000

The backend uses deterministic static analysis and the offline mock provider by default. Keep it running while using the extension in VS Code.

Step 2: Configure the Extension

Open VS Code Settings (Ctrl+,) and search for CodePilotGuardian AI:

Setting Default Description
codeguardian.backendUrl http://127.0.0.1:8000 Backend server address
codeguardian.autoAnalyzeOnSave true Auto-analyze on file save
codeguardian.enableCodeLens true Show action buttons above bugs
codeguardian.maxRepairIterations 3 Max autonomous fix attempts

Step 3: Open a Supported Language File

Bugs are detected automatically. Look for:

  • 🔴 Red/yellow squiggles in the editor
  • 🛡️ CodePilotGuardian AI panel in the Activity Bar (left sidebar)
  • CodeLens action buttons above detected bug lines

🎮 Commands

Access via Ctrl+Shift+P:

Command Description
CodePilotGuardian AI: Analyze Current File Manually trigger full analysis
CodePilotGuardian AI: Suggest & Validate Fix Generate + sandbox-test a fix
CodePilotGuardian AI: Preview Fix Diff See the diff before applying
CodePilotGuardian AI: Apply Verified Fix Apply the fix to your code
CodePilotGuardian AI: Generate Regression Tests Create pytest tests for the bug
CodePilotGuardian AI: Open Debugging Panel Focus the Inspector sidebar

🤖 AI Provider Configuration

Edit your .env file in the backend root:

# Use Gemini (recommended — free tier available)
AI_PROVIDER=gemini
GEMINI_API_KEY=your-gemini-api-key

# Or use OpenAI
# AI_PROVIDER=openai
# OPENAI_API_KEY=your-openai-key

# Or use mock provider (no key needed — great for demo/testing)
# AI_PROVIDER=mock

📁 Example Bugs (Try These!)

The repository includes ready-made demo files:

  • examples/demo1_logic_bug/demo.py — Inverted discount condition
  • examples/demo2_runtime_bug/demo.py — None dereference at runtime
  • examples/demo3_security_issue/demo.py — Unsafe eval() usage
  • examples/demo4_unverifiable_fix/demo.py — Bug with no safe auto-fix

🔒 Privacy & Security

  • All code analysis happens locally via your own backend server
  • No code is sent to third parties unless you configure a cloud AI provider (Gemini/OpenAI)
  • Fix validation runs in a sandboxed subprocess — destructive commands are blocked
  • All feedback and session data is stored in a local SQLite database

📄 License

MIT License — see LICENSE for details.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft