Website · CodeCarbon docs · EcoLogits docs · Discord
Code Carbon is a French non-profit (NGO). We build free, open-source software to help developers and researchers understand the energy and carbon impact of their work.
Most of what you see here is maintained by volunteers — researchers, engineers, and sustainability practitioners who contribute in their spare time. Sponsors and partner organisations provide hosting, funding, and expertise; the day-to-day work still runs on community effort.
People also build integrations outside these repos — editor plugins, status bars, and tooling that connect to our libraries and APIs. We highlight the ones we know about below; if you ship something similar, tell us on Discord.
AI and software need electricity. Where that code runs — on your laptop or on a provider's servers — changes what you can measure directly.
|
CodeCarbon |
EcoLogits |
|
|---|---|---|
| What it tracks | Emissions from local computing — code on hardware you control | Emissions from GenAI API calls — OpenAI, Anthropic, Mistral, etc. |
| Typical use cases | Model training, local inference, scripts on your machine or cloud VM | Chatbots, agents, RAG pipelines calling remote models |
| How it works | Measures CPU, GPU & RAM power, applies regional grid carbon intensity | Estimates impacts from request metadata (model, tokens, latency) via LCA models |
| Get started | pip install codecarbon |
pip install ecologits |
They are complementary, not competing. CodeCarbon is for compute you run yourself — training, local inference, jobs on your machines or cloud VMs. EcoLogits is for when you call third-party GenAI APIs and want to estimate the impact of those requests.
When to use CodeCarbon vs EcoLogits →
CodeCarbon — local compute emissions
Track COâ‚‚ from code running on your own hardware. Python library, CLI, cloud dashboard, and offline visualisation.
from codecarbon import EmissionsTracker
tracker = EmissionsTracker()
tracker.start()
# your code
emissions = tracker.stop()→ Documentation · Dashboard · Website
EcoLogits — GenAI API emissions
Python library that attaches environmental impact estimates to responses from official provider SDKs.
from ecologits import EcoLogits
from openai import OpenAI
EcoLogits.init(providers=["openai"])
response = OpenAI().chat.completions.create(model="gpt-4o-mini", messages=[...])
print(response.impacts.gwp.value.mean, "kgCO2eq")→ Documentation · Methodology
Related EcoLogits projects:
| Project | Description |
|---|---|
| ecologits-calculator | Interactive web calculator — no install, try at calculator.ecologits.ai |
| ecologits-api | REST API for impact estimates — live at api.ecologits.ai |
| Repository | What it is |
|---|---|
| impact | ML paper carbon calculator & LaTeX templates |
| codecarbon-mcp | MCP server for remote compute monitoring |
| vscode-extension-codecarbon | VS Code extension for CodeCarbon |
| ecologits.js | JavaScript client for EcoLogits |
These projects are maintained outside the mlco2 organisation but built on our open APIs and methodology. They are independent — not official releases — and we are grateful to the authors for extending the ecosystem.
| Project | Author | What it does |
|---|---|---|
| ecologits-statusline | Vincent Duarte | Drop-in Claude Code status-line snippet — live session energy, CO₂eq & water from output tokens via the EcoLogits API |
| ecologits-vscode | marmelab | VS Code status bar for Claude Code sessions (last use, workspace, or all-time totals). Adaptation of the status-line project above |
VS Code status bar integration by marmelab/ecologits-vscode
Built something on CodeCarbon or EcoLogits? Open a PR to mlco2/.github or ping us on Discord — happy to list it here.
We welcome issues, pull requests, documentation fixes, and methodology feedback — whether you have an hour or a recurring slot.
- CodeCarbon: Contributing guide
- EcoLogits: Contributing guide
- Chat: Discord
- Support the NGO: HelloAsso — Code Carbon
Our tools stay free thanks to organisations that sponsor infrastructure, funding, or expertise. Community volunteers do the rest.
Infrastructure & core sponsors (CodeCarbon)
EcoLogits sponsors
Historical & research partners: Mila, BCG GAMMA, Comet, Haverford College, Boavizta
Made with care by volunteers at Code Carbon · mlco2 on GitHub