EcoLint is a powerful VS Code extension that helps developers write more energy-efficient and sustainable code. It analyzes your code for energy-inefficient patterns and uses Google Gemini AI to suggest and apply optimized refactoring.
Features
- AI-Powered Code Optimization: Integrates with Gemini AI to suggest energy-efficient code improvements.
- Carbon Impact Estimation: Calculates potential carbon savings from code optimizations.
- Gamified Experience: Tracks your environmental impact with a "Trees Saved" status bar counter.
- Support for Modern Web Languages: Works with JavaScript, TypeScript, React, and more.
Requirements
You must provide a valid Google Gemini API Key in the extension settings to enable AI-powered optimizations.
Extension Settings
This extension contributes the following settings:
ecolint.geminiApiKey: Your Google Gemini API Key.ecolint.modelId: The specific Gemini model ID to use (default: gemini-2.5-flash).
Usage
- Open a JavaScript or TypeScript file.
- Open the Command Palette (
Ctrl+Shift+PorCmd+Shift+P). - Run "EcoLint: Optimize with Gemini".
- Review the suggested changes and apply them.
Release Notes
0.0.1
Initial release of EcoLint.