CodeFlash VS Code Extension

AI-powered Python code optimization directly in VS Code. Automatically identify performance bottlenecks and apply intelligent improvements.
Features
✨ Inline Optimization Suggestions - See optimization opportunities directly above function definitions
🎯 Smart Function Detection - Automatically identifies optimizable Python functions
⚡ One-Click Optimization - Apply AI-generated improvements instantly
📊 Real-time Progress - Track optimization progress with detailed status updates
🔄 Git Integration - Optimize only changed functions with "Optimize Changed Functions"
🎨 Clean Interface - Subtle, developer-focused UI that respects your VS Code theme
Prerequisites
Before installing the VS Code extension:
Install CodeFlash CLI:
pip install codeflash
Initialize your project:
codeflash init
Requirements:
- Python 3.8+
- Git repository (required)
- VS Code 1.94.0+
Quick Start
- Install the CodeFlash extension from VS Code Marketplace
- Open a Python file - CodeFlash activates automatically
- See
optimize
suggestions appear above optimizable functions
- Click to optimize or use the sidebar to manage optimization queue
- Use "Optimize Changed Functions" to optimize only your recent changes
Usage
Inline CodeLens
# optimize <- Click to optimize
def slow_function(data):
result = []
for item in data:
if item in [1, 2, 3, 4, 5]:
result.append(item * 2)
return result
- Optimizable Functions: Browse all functions that can be optimized
- Optimizations: View active, queued, completed, and failed optimizations
- Git Integration: "Optimize Changed Functions" button for targeted optimization
Key Workflow
- Code normally - Write and modify Python functions
- See suggestions - CodeFlash shows optimization opportunities
- Optimize selectively - Choose which functions to improve
- Track progress - Monitor optimizations in the sidebar
- Review changes - View diffs and apply improvements
Configuration
Access settings via Ctrl+,
→ Extensions → CodeFlash:
- Auto Analysis: Enable automatic function analysis
- Inline Hints: Show/hide inline optimization suggestions
- Progress Tracking: Control optimization progress detail level
- Theme Integration: UI automatically adapts to your VS Code theme
Documentation
📖 Complete Documentation: https://docs.codeflash.ai/
Key Resources:
Troubleshooting
Extension won't activate?
- Ensure you've run
codeflash init
in your project
- Verify Git repository exists (
.git
folder)
- Check Python 3.8+ is installed and in PATH
No functions showing?
- Open a
.py
file with functions
- Wait for analysis to complete
- Check VS Code Output → CodeFlash for errors
Need help?
About CodeFlash
CodeFlash is an AI-powered Python optimization platform that helps developers write faster, more efficient code. The VS Code extension provides seamless integration with the CodeFlash optimization engine.
Learn More: https://docs.codeflash.ai/
Questions? Visit our documentation or report issues.