npx claudepluginhub jeremiesamson/green-codeTrack your AI carbon footprint and plant trees to compensate via Tree-Nation
Track your AI carbon footprint and plant trees to compensate.
<img width="545" height="320" alt="status" src="https://github.com/user-attachments/assets/da542e39-6b01-4534-b9dc-a87d9e84d7c7" />/plugin marketplace add jsamson/green-code
/plugin install green-code@green-code-marketplace
On first launch, the plugin asks for your Tree-Nation API token and preferences.
| Command | Description |
|---|---|
/green:status | View your carbon footprint and tree balance |
/green:plant | Plant trees to offset accumulated CO2 |
/green:plant 3 | Plant a specific number of trees |
/green:config | View current configuration |
/green:config mode auto | Switch to auto-plant mode |
At each session end, the plugin reads ~/.claude/stats-cache.json and computes the delta since the last check.
| Token type | Wh per token | Rationale |
|---|---|---|
| Output (generation) | 0.002 | Full GPU forward pass + sampling |
| Input (fresh) | 0.0005 | Prefill, parallelizable |
| Cache creation | 0.0005 | Same as prefill |
| Cache read | 0.00002 | Memory I/O, minimal compute |
Trees are planted via the Tree-Nation REST API. You need a Tree-Nation account and API token.
stats-cache.json may not update in real-time in all Claude Code versionsjq (JSON processor) -- install: sudo apt install jq / brew install jqbc (calculator) -- usually pre-installed on Linux/macOScurl -- usually pre-installedMIT