Eco Mind Carbon Tracker for VS Code
Track the carbon footprint of your Claude Code sessions in real-time.
Features
- Real-time Monitoring: See energy consumption, CO₂ emissions, and water usage as you code
- Status Bar Widget: Quick glance at your current session's impact
- Token Breakdown: Visualize input, output, and cached token distribution
- AI-Powered Narratives: Generate shareable impact stories (requires Gemini API key)
- Session History: Track carbon footprint across multiple coding sessions
Installation
From Source (Development)
- Clone the repository:
git clone https://github.com/eco-mind/san-francisco-2026
cd san-francisco-2026/vscode-extension
- Install dependencies:
npm install
- Compile:
npm run compile
- Open in VS Code and press
F5 to launch the Extension Development Host
From VSIX Package
code --install-extension eco-mind-vscode-0.1.0.vsix
Requirements
- VS Code 1.85.0 or higher
- Claude Code installed and running (for session tracking)
Configuration
Open VS Code Settings and search for "Eco Mind":
| Setting |
Description |
Default |
eco-mind.geminiApiKey |
Gemini API key for AI-powered narratives |
(empty) |
eco-mind.refreshInterval |
Data refresh interval in milliseconds |
5000 |
Getting a Gemini API Key
- Go to Google AI Studio
- Create a new API key
- Add it to VS Code settings
Usage
- Open the Sidebar: Click the leaf icon in the Activity Bar
- View Metrics: See real-time energy, CO₂, water usage, and token breakdown
- Copy Impact Story: Click "Copy" to share your session's environmental impact
- Status Bar: Glance at the bottom-right for quick energy stats
How It Works
Eco Mind reads Claude Code's JSONL conversation logs from ~/.claude/projects/ and calculates energy consumption using:
- Token-based energy model (Joules per token, varies by model)
- PUE factor of 1.10 (data center overhead)
- US grid average: 390g CO₂/kWh
- Data center cooling: 7500ml water/kWh
Commands
Eco Mind: Show Carbon Report - Focus the sidebar panel
Eco Mind: Refresh - Manually refresh data
Eco Mind: Copy Impact Story - Copy narrative to clipboard
License
MIT
| |