Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>CodeLensXNew to Visual Studio Code? Get it now.
CodeLensX

CodeLensX

Harshit Vashisht

|
1 install
| (1) | Free
AI-powered code review and optimization
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CodeLensX

Intelligent code review powered by Google's AI Studio - Automatically detect and fix bugs, security vulnerabilities, and code quality issues in your projects.


✨ Features

🔍 Comprehensive Code Analysis

  • Automatic Bug Detection - Finds null/undefined errors, type issues, and async problems
  • Security Vulnerability Scanning - Detects hardcoded secrets, XSS risks, and injection vulnerabilities
  • Code Quality Improvements - Identifies console.logs, unused code, and poor naming conventions

🤖 AI-Powered Fixes

  • Automatic Code Fixes - AI analyzes and fixes issues directly in your files
  • Smart Categorization - Issues organized by severity (Security, Bugs, Quality)
  • Detailed Reports - Beautiful summary reports with actionable insights

📊 Real-Time Progress

  • Live Progress Indicator - See exactly what's being reviewed in real-time
  • Current File Display - Know which file is being analyzed
  • Issue Counters - Watch security, bug, and quality issues being found
  • Cancellable Reviews - Stop review anytime with instant cancellation

🎨 Beautiful UI

  • Interactive Sidebar - Easy-to-use interface with multiple views
  • Setup Wizard - Quick API key validation and configuration
  • Review History - Track all past reviews and improvements
  • Results Dashboard - Professional report with statistics and issue breakdown

📸 Screenshots

Main Menu

Clean interface with easy access to all features.

Live Progress

Real-time updates showing current file, progress, and issues found.

Review Results

Comprehensive report with AI summary, statistics, and categorized issues.


🚀 Quick Start

Prerequisites

  • VS Code 1.85 or higher
  • Google AI API Key (free from Google AI Studio)

Installation

  1. Install the Extension

    # From VS Code Marketplace (coming soon)
    # OR install from .vsix file
    code --install-extension ai-code-reviewer.vsix
    
  2. Open Sidebar

    • Click the AI Code Reviewer icon in the Activity Bar (left sidebar)
  3. Enter API Key

    • First time: Enter your Google AI API key
    • Click Validate Key to test
    • Click Save Key to store securely
  4. Start Reviewing!

    • Click Review Workspace to analyze entire project
    • Or Review Current File for quick checks

📖 How to Use

1. Setup API Key

First Time Setup:

  1. Click AI Code Reviewer icon in sidebar
  2. Get your free API key from Google AI Studio
  3. Paste key in the input field
  4. Click Validate Key (checks if key works)
  5. Click Save Key (stores securely in VS Code)

Change API Key Later:

  • Settings → Change API Key

2. Review Your Code

Review Entire Workspace:

Sidebar → Review Workspace
OR
Command Palette (Ctrl+Shift+P) → "AI Code Review: Review Workspace"

Review Current File:

Sidebar → Review Current File
OR
Command Palette → "AI Code Review: Review Current File"

What Happens:

  1. ⚡ Progress view appears in sidebar
  2. 📁 AI scans all files (skips node_modules, dist, build)
  3. 🔍 Analyzes each file for issues
  4. ✅ Automatically fixes problems
  5. 📊 Shows comprehensive results

3. View Results

Results Panel Opens Automatically:

  • AI Summary - Complete AI-generated summary
  • Statistics - Files analyzed, fixed, issues found
  • Security Issues - Vulnerabilities and fixes (🔴)
  • Bug Fixes - Logic errors and corrections (🟠)
  • Quality Improvements - Code style and best practices (🟡)

Click on Any Issue:

  • Jumps directly to the file and line
  • See the exact fix that was applied

4. Review History

View Past Reviews:

Sidebar → View Summary

Features:

  • See all past reviews with timestamps
  • View statistics for each review
  • Click to reopen any past report
  • Clear history when needed

⚙️ Configuration

Settings

Access settings via:

  • Sidebar → Settings
  • VS Code Settings → Extensions → AI Code Reviewer

Available Settings

Setting Description Default
API Key Google AI API key Not set
Auto-fix Automatically apply fixes true
Show Notifications Display review completion alerts true

🎯 What Gets Reviewed

File Types Analyzed

  • ✅ JavaScript (.js)
  • ✅ TypeScript (.ts, .tsx)
  • ✅ React (.jsx)
  • ✅ HTML (.html)
  • ✅ CSS (.css)

Automatically Excluded

  • ❌ node_modules/
  • ❌ dist/
  • ❌ build/
  • ❌ .git/
  • ❌ coverage/

Issues Detected

🔴 Security Issues:

  • Hardcoded API keys and secrets
  • Password storage vulnerabilities
  • XSS (Cross-Site Scripting) risks
  • SQL injection vulnerabilities
  • Use of eval() and dangerous functions

🟠 Bugs:

  • Null/undefined reference errors
  • Missing error handling
  • Async/await issues
  • Type mismatches
  • Logic errors

🟡 Code Quality:

  • Console.log statements
  • Unused variables and imports
  • Poor variable naming
  • Missing documentation
  • Duplicate code
  • Inefficient algorithms

🎮 Commands

All commands available via Command Palette (Ctrl+Shift+P or Cmd+Shift+P):

Command Description
AI Code Review: Review Workspace Analyze all files in workspace
AI Code Review: Review Current File Analyze only the active file
AI Code Review: Open Settings Open extension settings
AI Code Review: Cancel Review Stop ongoing review

🔐 Security & Privacy

Your Data is Safe

  • ✅ API Key stored securely - Encrypted in VS Code's SecretStorage
  • ✅ No data collection - Extension doesn't collect or store your code
  • ✅ Direct API calls - Code sent only to Google AI, not our servers
  • ✅ Local processing - All operations happen on your machine

What Gets Sent to AI

  • Only the code files being reviewed
  • File paths (for context)
  • Nothing else

What Doesn't Get Sent

  • Your API key (stays local)
  • Personal information
  • Git history
  • Environment variables
  • Other workspace files

🐛 Troubleshooting

Common Issues

❌ "API key not configured"

  • Solution: Open sidebar → Enter and validate your API key

❌ "Invalid API key"

  • Solution: Get a new key from Google AI Studio
  • Make sure you copied the entire key

❌ "No workspace folder open"

  • Solution: Open a folder in VS Code (File → Open Folder)

❌ Review takes too long

  • Solution:
    • Normal for large projects (50+ files)
    • Check Output channel (View → Output → "AI Code Reviewer") for progress
    • Click Cancel if needed

❌ Files not getting fixed

  • Solution:
    • Check Output channel for errors
    • Verify files aren't read-only
    • Make sure AI detected actual issues

Getting Help

  1. Check Output Channel

    View → Output → Select "AI Code Reviewer"
    

    See detailed logs of what's happening

  2. Check Debug Console

    Help → Toggle Developer Tools → Console tab
    

    Look for error messages

  3. Report Issues

    • Include error messages from Output channel
    • Describe steps to reproduce
    • Mention VS Code version

📊 Performance

Speed

  • Small Projects (< 20 files): ~30 seconds
  • Medium Projects (20-50 files): ~2 minutes
  • Large Projects (50+ files): ~4-5 minutes

Optimization Tips

  • Review specific folders instead of entire workspace
  • Use "Review Current File" for quick checks
  • Exclude unnecessary folders in .gitignore

🎓 Best Practices

When to Use

✅ Good Use Cases:

  • Before committing code
  • After major refactoring
  • When joining new projects
  • Before code reviews
  • After merging branches

❌ Not Recommended:

  • On minified code
  • On generated files
  • On third-party libraries
  • During active development (too disruptive)

Tips for Best Results

  1. Start Small - Review single files first to understand behavior
  2. Review Changes - Look at what was fixed before committing
  3. Use Version Control - Always have git backup before bulk fixes
  4. Check Output - Monitor Output channel during reviews
  5. Review Regularly - Catch issues early with frequent reviews

🔄 Updates & Roadmap

Current Version: 1.0.0

What's New:

  • 🎉 Initial release
  • ✅ AI-powered code analysis
  • ✅ Automatic issue fixing
  • ✅ Real-time progress tracking
  • ✅ Review history
  • ✅ Beautiful UI

Coming Soon

  • 📝 Custom review rules
  • 🎯 Ignore patterns configuration
  • 🔍 Git integration (review only changed files)
  • 📊 Code metrics dashboard
  • 🎨 Customizable AI prompts
  • ⏰ Scheduled reviews
  • 🤝 Team sharing features

💡 Tips & Tricks

Keyboard Shortcuts

Configure in VS Code settings:

{
  "keybindings": [
    {
      "key": "ctrl+shift+r",
      "command": "aiCodeReviewer.reviewWorkspace"
    }
  ]
}

Review Only Specific Files

  1. Open the file you want to review
  2. Use "Review Current File" command
  3. Much faster for targeted checks

Cancel Long Reviews

  • Click "Cancel Review" button in progress view
  • OR press Cancel in notification
  • Review stops within 1 second

🤝 Contributing

Contributions are welcome! If you'd like to contribute:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

Ideas for Contributions:

  • New language support
  • Additional issue detection patterns
  • UI improvements
  • Documentation enhancements
  • Bug fixes

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


🙏 Acknowledgments

  • Google Gemini AI - For powerful AI analysis capabilities
  • VS Code Team - For excellent extension API
  • Contributors - Thank you for making this better!

📞 Support

Need Help?

  • 📖 Read the documentation above
  • 🐛 Report bugs via GitHub Issues
  • 💬 Ask questions in Discussions
  • ⭐ Star the repo if you find it useful!

Stay Updated

  • Watch repository for updates
  • Follow releases for new features
  • Check changelog for version history

🎉 Get Started Now!

  1. Install the extension
  2. Get your Google AI API key
  3. Open sidebar and configure
  4. Start reviewing code!

Happy Coding! 🚀


Made with ❤️ by Harshit Vashist

Transform your code quality with AI-powered reviews!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft