@andi0b/pi-carbon-footprint
v0.1.1
Published
Show EcoLogits CO₂ and water estimates for your current Pi session.
Maintainers
Readme
pi-carbon-footprint
See the estimated environmental impact of your current Pi session directly in the UI.
The session total is shown as CO₂ equivalent and water consumption, giving you a compact view of the footprint behind your model usage.

Command-line options
--footprint-zone <ISO3>: electricity mix zone to use for EcoLogits estimates. Defaults toWOR.--no-footprint: disable footprint estimates for the session.
Example:
pi --footprint-zone USACommands
/footprint: show current-session details, including per-model output tokens and CO₂/water estimate totals.
Install/use
Install the extension package from npm:
pi install npm:@andi0b/pi-carbon-footprintThen start Pi normally; the installed extension is discovered automatically:
pi --footprint-zone USAYou can also install it from a local checkout during development:
pi install /path/to/pi-carbon-footprint
piHow estimates work
For each assistant response, the extension sums output tokens by provider/model, then calls the EcoLogits estimation endpoint once per (provider, model, electricity mix zone) with output_token_count: 10000. It derives midpoint-per-token values from that basis, multiplies those values by the session's accumulated assistant output tokens, and caches estimates in memory for the current Pi session.
Known issues
Supported provider mappings are intentionally conservative: openai, anthropic, mistral/mistralai, google/gemini, cohere, and huggingface variants. OpenAI-compatible providers that are not actually OpenAI are treated as unsupported by default.
Contributing
This project does not accept issues or pull requests. Create your own fork.
