Skip to content
@mlco2

CodeCarbon

Open tools to measure the environmental footprint of local compute & remote GenAI

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.


Two tools, one mission

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 →


Projects

CodeCarbon — local compute emissions

Track COâ‚‚ from code running on your own hardware. Python library, CLI, cloud dashboard, and offline visualisation.

PyPI Stars

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.

PyPI Stars

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

More first-party repositories

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

Community integrations

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

EcoLogits impact shown in the VS Code status bar
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.


Get involved

We welcome issues, pull requests, documentation fixes, and methodology feedback — whether you have an hour or a recurring slot.


Sponsors & partners

Our tools stay free thanks to organisations that sponsor infrastructure, funding, or expertise. Community volunteers do the rest.

Infrastructure & core sponsors (CodeCarbon)

Clever Cloud     Data For Good     GitHub     Mozilla

EcoLogits sponsors

Resilio    Terra Cognita    Sopht    Avanade    Theodo    Ministère de la Culture

Historical & research partners: Mila, BCG GAMMA, Comet, Haverford College, Boavizta


Made with care by volunteers at Code Carbon · mlco2 on GitHub

Pinned Loading

  1. codecarbon codecarbon Public

    Track emissions from Compute and recommend ways to reduce their impact on the environment.

    Python 1.9k 307

  2. ecologits ecologits Public

    🌱 EcoLogits tracks the energy consumption and environmental footprint of using generative AI models through APIs.

    Python 308 31

  3. ecologits-api ecologits-api Public

    🌱 Estimate the environmental footprint of GenAI with EcoLogits API

    Python 7 1

  4. ecologits-calculator ecologits-calculator Public

    đź§® EcoLogits Calculator estimate the environmental footprint of your GenAI usage

    Python 7 2

  5. codecarbon-data codecarbon-data Public

    Jupyter Notebook

Repositories

Showing 10 of 14 repositories

Sponsors

  • Private Sponsor

Top languages

Loading…

Most used topics

Loading…