{"_id":"@andi0b/pi-carbon-footprint","_rev":"2-c5e53c88017729d37e3fa1b0d49d0496","name":"@andi0b/pi-carbon-footprint","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@andi0b/pi-carbon-footprint","version":"0.1.0","keywords":["pi-package","pi-extension","ecologits","carbon","water"],"_id":"@andi0b/pi-carbon-footprint@0.1.0","maintainers":[{"name":"andi0b","email":"andreas@bischel.eu"}],"homepage":"https://github.com/andi0b/pi-carbon-footprint#readme","bugs":{"url":"https://github.com/andi0b/pi-carbon-footprint/issues"},"pi":{"image":"./preview.webp","extensions":["./extensions"]},"dist":{"shasum":"dbaa46d8bd86c8452c5b05c21d09a3a450983004","tarball":"https://registry.npmjs.org/@andi0b/pi-carbon-footprint/-/pi-carbon-footprint-0.1.0.tgz","fileCount":7,"integrity":"sha512-CaX38X66IF94vN27isSZIYAiX6tdPy+BhB4mhg/aID03VjQVYN3QC58Vp6Kg6cdJnFhPysBfT38urFIzQFFHwQ==","signatures":[{"sig":"MEUCIQCgO7o5lh7M14/KyuUkBo7tUe3S4Bb97xuyqnVSuGY6HQIgar6IGmGGwDavWRpwY6wFI5yOGwA+8AMqX9SdVrYoySU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":343138},"type":"module","gitHead":"c4d8dbc8470ad7a962c89ea00bb990676f8d6d17","scripts":{"lint":"biome check .","check":"npm run typecheck && npm run lint","format":"biome check --write .","typecheck":"tsc --noEmit"},"_npmUser":{"name":"andi0b","email":"andreas@bischel.eu"},"repository":{"url":"git+https://github.com/andi0b/pi-carbon-footprint.git","type":"git"},"_npmVersion":"11.10.0","description":"Show EcoLogits CO₂ and water estimates for your current Pi session.","directories":{},"_nodeVersion":"24.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"npm@11.17.0+sha512.3eeaf18997b11070d313849268b23766b9db0068997dec9471073170fe43fa17f2b4d0337bf0f52330ee2274e7f5754b21b01052742e48f5c9c74d8b1e32ef43","devDependencies":{"typescript":"^6.0.3","@types/node":"^25.9.3","@biomejs/biome":"^2.5.0"},"peerDependencies":{"@earendil-works/pi-ai":"*","@earendil-works/pi-tui":"*","@earendil-works/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-carbon-footprint_0.1.0_1781704475568_0.626255364352275","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@andi0b/pi-carbon-footprint","version":"0.1.1","description":"Show EcoLogits CO₂ and water estimates for your current Pi session.","repository":{"type":"git","url":"git+https://github.com/andi0b/pi-carbon-footprint.git"},"publishConfig":{"access":"public"},"keywords":["pi-package","pi-extension","ecologits","carbon","water"],"type":"module","scripts":{"typecheck":"tsc --noEmit","lint":"biome check .","format":"biome check --write .","check":"npm run typecheck && npm run lint"},"peerDependencies":{"@earendil-works/pi-ai":"*","@earendil-works/pi-coding-agent":"*","@earendil-works/pi-tui":"*"},"pi":{"extensions":["./extensions"],"image":"./preview.webp"},"devDependencies":{"@biomejs/biome":"^2.5.0","@types/node":"^25.9.3","typescript":"^6.0.3"},"packageManager":"npm@11.17.0+sha512.3eeaf18997b11070d313849268b23766b9db0068997dec9471073170fe43fa17f2b4d0337bf0f52330ee2274e7f5754b21b01052742e48f5c9c74d8b1e32ef43","gitHead":"d7d5caf6e787afd55b2b45d3df661447c00c0707","_id":"@andi0b/pi-carbon-footprint@0.1.1","bugs":{"url":"https://github.com/andi0b/pi-carbon-footprint/issues"},"homepage":"https://github.com/andi0b/pi-carbon-footprint#readme","_nodeVersion":"24.16.0","_npmVersion":"11.10.0","dist":{"integrity":"sha512-NRLFZFGcyZbJRSv/B5uZgxD0yho+hqe0yGWnRw4Dz+WMHSatXCUuTe/XJJIsrw73sAOZ5BES1YfqWNd8W7OXpQ==","shasum":"d87e142523a2b670eda1a62d5da905fa6795e451","tarball":"https://registry.npmjs.org/@andi0b/pi-carbon-footprint/-/pi-carbon-footprint-0.1.1.tgz","fileCount":7,"unpackedSize":343011,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCr7k23b0Ijh272tDLTfJm/v0o5Jb+5b6Rl0IQf3jU9ugIhAKJV0BdOXslEHiXHQPTRrkjkhPWKbUmZCmZOEP8OQ0kL"}]},"_npmUser":{"name":"andi0b","email":"andreas@bischel.eu"},"directories":{},"maintainers":[{"name":"andi0b","email":"andreas@bischel.eu"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-carbon-footprint_0.1.1_1781705395853_0.4102384036989757"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-17T13:54:35.419Z","modified":"2026-06-17T14:09:56.145Z","0.1.0":"2026-06-17T13:54:35.749Z","0.1.1":"2026-06-17T14:09:56.027Z"},"bugs":{"url":"https://github.com/andi0b/pi-carbon-footprint/issues"},"homepage":"https://github.com/andi0b/pi-carbon-footprint#readme","keywords":["pi-package","pi-extension","ecologits","carbon","water"],"repository":{"type":"git","url":"git+https://github.com/andi0b/pi-carbon-footprint.git"},"description":"Show EcoLogits CO₂ and water estimates for your current Pi session.","maintainers":[{"name":"andi0b","email":"andreas@bischel.eu"}],"readme":"# pi-carbon-footprint\n\nSee the estimated environmental impact of your current [Pi](https://github.com/earendil-works/pi) session directly in the UI.\n\nThe session total is shown as CO₂ equivalent and water consumption, giving you a compact view of the footprint behind your model usage.\n\n![pi-carbon-footprint screenshot](./preview.webp)\n\n## Command-line options\n\n- `--footprint-zone <ISO3>`: electricity mix zone to use for EcoLogits estimates. Defaults to `WOR`.\n- `--no-footprint`: disable footprint estimates for the session.\n\nExample:\n\n```bash\npi --footprint-zone USA\n```\n\n## Commands\n\n- `/footprint`: show current-session details, including per-model output tokens and CO₂/water estimate totals.\n\n## Install/use\n\nInstall the extension package from npm:\n\n```bash\npi install npm:@andi0b/pi-carbon-footprint\n```\n\nThen start Pi normally; the installed extension is discovered automatically:\n\n```bash\npi --footprint-zone USA\n```\n\nYou can also install it from a local checkout during development:\n\n```bash\npi install /path/to/pi-carbon-footprint\npi\n```\n\n## How estimates work\n\nFor each assistant response, the extension sums output tokens by provider/model, then calls the [EcoLogits](https://ecologits.ai/) 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.\n\n## Known issues\n\nSupported 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.\n\n## Contributing\n\nThis project does not accept issues or pull requests. Create your own fork.\n","readmeFilename":"README.md"}