SustainaDev is an AI-powered VS Code extension that helps developers write more sustainable, efficient, and optimized code. It automatically detects code smells, suggests refactoring strategies, and measures the energy and carbon impact of your code.
✨ Features
Feature
Description
🔍 Code Smell Detection
Automatically identifies nested loops, recursion, string concatenation in loops, and sorting inefficiencies
⚡ AI-Powered Optimization
Suggests and applies refactoring strategies using Tree-sitter AST analysis
📊 Complexity Reports
Compares time and space complexity before and after optimization
🌱 Sustainability Metrics
Estimates energy consumption (kWh) and carbon footprint (gCO₂) of your code
📈 Dashboard
Visual overview of all optimization history and sustainability gains
🖥️ System Specs
View hardware specifications relevant to energy profiling
🌐 Supported Languages
☕ Java
🐍 Python
🟨 JavaScript
🔷 TypeScript
🚀 Getting Started
Install the extension from the VS Code Marketplace
Open a supported source file (.java, .py, .js, .ts)
Press Ctrl+Shift+P and run SustainaDev: Analyze & Suggest Refactor
Review the diff and accept or reject the optimization
View complexity and sustainability reports in the Output panel