JeremieSamson/green-code

6 stars · Last commit 2026-06-10

Track your AI carbon footprint in Claude Code and plant trees to offset it via Tree-Nation

README preview

# green-code

Track your AI carbon footprint and plant trees to compensate.

![green-code session start summary](docs/session-start.png)

## What it does

- Shows a carbon footprint summary at every Claude Code session start (CO2 emitted, trees planted, debt, progress bar towards next tree)
- Silently tracks your Claude Code token consumption at each session end
- Estimates energy use (kWh) and CO2 emissions based on published research
- Two modes: **auto** (plant trees automatically at threshold) or **manual** (track and plant on demand)
- Plants real trees via [Tree-Nation](https://tree-nation.com) API

## Install

```bash
/plugin marketplace add JeremieSamson/green-code
/plugin install green-code@green-code-marketplace
```

View full repository on GitHub →