CodeLeft
Overview
CodeLeft is a Visual Studio Code extension that leverages AI and generative AI to perform static code analysis, helping you assess and improve your code quality. By evaluating your code against industry standards like SOLID principles, OWASP Top Ten, and more, CodeLeft provides actionable insights and grades ranging from A+ (highest) to F (lowest), empowering developers to write secure, maintainable, and robust code.
Features
Code Quality & Refactoring
- SOLID Principles Assessment: Automatically assess your code for adherence to SOLID principles. Receive actionable, AI-driven insights to refactor and improve your code's structure and quality.
- Clean Code Principles: Ensure your code follows established Clean Code guidelines, enhancing readability, simplicity, and long-term maintainability while reducing technical debt.
- PR Ready: Get your code pull-request-ready by automatically identifying and flagging common issues like leftover
TODO comments, debug statements, and code smells before you commit.
- Complexity Analysis: Visualize your code's complexity with a detailed UI that provides a file-by-file heatmap. Quickly pinpoint which areas of your code have high cyclomatic complexity and are candidates for refactoring to reduce potential tech debt.
- Complexity Pro Analysis: Go deeper than file-level analysis. This feature analyzes your code function by function, providing hyper-detailed complexity metrics to identify specific methods that are overly complex and difficult to maintain.
- Testability Score: Receive a quantitative score on how testable any given file is. The analysis identifies factors like hard-coded dependencies and global state usage that can make unit testing difficult, helping you write more modular and testable code.
Security & Compliance
- OWASP Top Ten Security Compliance: Identify and rectify critical security vulnerabilities in your code, aligned with the latest OWASP Top Ten standards for web application security.
- CWE Top 25 Security Compliance: Scan your code for the most dangerous software weaknesses as defined by the MITRE CWE Top 25 list. This helps you eliminate common and critical programming errors that can lead to severe vulnerabilities like buffer overflows and injection attacks.
- MISRA C++ Compliance: Analyze your C++ code against MISRA guidelines, an essential feature for projects in safety-critical and high-reliability environments (e.g., automotive, aerospace, medical) that demand rigorous standards.
Code Reviews & AI Auto-Fix
- Standard Code Review: Get a brief, high-level summary of how your code can be improved to achieve the next grade level, perfect for quick checks and minor adjustments.
- Pro Code Review: Receive detailed, line-by-line insights into how to improve your code. Each suggestion includes a diagnosis of the problem, a recommended solution, and a clear explanation of why the change is necessary.
- Ultimate Code Review (AI Auto-Fix): Accelerate your workflow with one-click fixes. Automatically implement the suggestions from the Pro Code Review directly into your code. A diff UI allows you to review all changes alongside the reasoning before you approve and commit.
Testing & Coverage
- Intelligent Test Generation: Automatically generate comprehensive unit tests for your codebase. The tool intelligently understands dependencies to create effective mocks and can be configured for your specific language and testing framework (requires relevant VS Code plugins).
- Functional/Behavioral Coverage: Go beyond line coverage to evaluate how thoroughly your tests cover expected behaviors, edge cases, and integrations of your application, enhancing overall reliability and robustness.
- Comprehensive Code Coverage Analysis: Get a clear overview of your project's health with detailed reports that show how well individual files perform across a full suite of assessments, allowing you to identify areas for improvement at a glance.
Workflow & Productivity
- Integrated VS Code Plugin: Seamlessly access all platform features directly within the Visual Studio Code editor. Track code quality metrics and receive instant feedback without disrupting your development process.
- Automated Repository Setup & File Marking: Easily onboard new and existing projects with a single click. The tool automatically marks files that need refactoring and assesses their adherence to selected best practices.
- Team Performance Analytics: Monitor both individual and team performance with in-depth analytics. Uncover trends in code quality and productivity, and foster friendly competition to boost motivation and output.
Of course. Here are more concise versions of the documentation feature description.
Documentation Creation
- One-Click Documentation: Generate a full knowledge base for your repository instantly.
- Visualize Your Code: Automatically create architecture diagrams and logic flowcharts.
- Tailored for Your Team: Produce role-specific views for architects, seniors, and developers.
- Modify with Confidence: Includes dependency lists and AI-powered safe-editing guides.
Installation
- Open Visual Studio Code.
- Go to the Extensions view (
Ctrl+Shift+X or Cmd+Shift+X ).
- Search for
CodeLeft .
- Click Install.
- After installation, you will be prompted to enter your API key in the side bar menu. Sign up at CodeLeft.ai to get your key.
Usage
- Run Assessments: Open the Command Palette (
Ctrl+Shift+P or Cmd+Shift+P ) and type CodeLeft: to see all available commands. You can run assessments on the current file or the entire workspace.
- Review Results: Assessment results, grades, and code review feedback will appear in the CodeLeft side panel and directly as annotations in your code.
- Use AI Auto-Fix: In a code review report, click the "Apply Fix" button to automatically implement suggestions.

CodeLeft is as simple as right-clicking on your code and getting an instant grade. The intuitive interface makes code quality assessment effortless and accessible to developers of all levels.
For a more comprehensive view of the UI and the different screens and dashboards that can be created, visit: https://codeleft.ai/console/demo-guide
Configuration
Access the extension settings on the left hand side bar.
- Set your API Key.
- Define minimum grade thresholds for code coverage.
- Enable or disable specific assessments.
- Customize your username for team analytics.
Requirements
- Visual Studio Code version 1.95 or newer.
- An active internet connection.
- A valid API Key from CodeLeft.ai.
Support
For questions, bug reports, or feature requests, please contact our support team at support@codeleft.ai or visit our community forum.
| |