EcoTrace
VS Code Extension + CLI

Catch carbon
before you ship.

EcoTrace spots carbon-heavy patterns in your code the moment you write them. CO₂ estimates, inline squiggles, one-click fixes, and a grade from A to F - right in your editor and your CI pipeline.

Free & open source

index.html Grade C - 0.8g CO₂/load
1 <img src="hero.png">
2 <img src="avatar.jpg">
3 <video autoplay>
4 <script src="app.js">
5 </script>
💡 Quick fix available - press ⌘. to fix all

Know exactly where you stand.

Every file gets a grade based on its total estimated CO₂ per page load.

A 0g
B < 0.5g
C < 1.0g
D < 2.0g
F ≥ 2.0g

Everything in one place.

Inline diagnostics

Squiggles on carbon-heavy patterns as you type - images, videos, scripts, iframes, and JS patterns.

CO₂ estimates

Real estimates using actual local file sizes and the Sustainable Web Design model (0.25g CO₂/MB).

One-click fixes

Hit ⌘. and fix issues instantly - add lazy loading, swap image formats, defer scripts.

Carbon report

Per-file breakdown with grade, session diff, and projected daily CO₂ impact at different traffic levels.

Workspace dashboard

All files in your project ranked by carbon cost - spot the worst offenders at a glance.

Session tracking

See your grade change since you opened the file. Improve as you code, not after you ship.

Run it anywhere.
Block bad code in CI.

The same analysis engine works as a standalone CLI - no VS Code needed. Drop it into pre-commit hooks, GitHub Actions, or any pipeline.

Fail CI if grade drops below C JSON output for dashboards GitHub Actions ready
terminal

$ npx ecotrace-cli src/**/*.html --threshold C

A src/about.html 0.0g CO₂/load

B src/index.html 0.3g CO₂/load

C src/blog.html 0.9g CO₂/load

F src/landing.html 3.1g CO₂/load ✕ below threshold

✕ 1 file below grade C — exiting with code 1

Start writing greener code today.

Free, open source, and takes 30 seconds to install.