ai-agent

Codecarbon

Track emissions from Compute and recommend ways to reduce their impact on the environment.
1,898 stars310 forksPythonUpdated 8/13/2026100% free · open source
What it does

Codecarbon tracks emissions from compute resources and recommends ways to reduce their environmental impact

When to use it
  • When developing AI models that require significant computational resources
  • When trying to reduce the carbon footprint of your data center or cloud infrastructure
  • When needing to estimate and report the environmental impact of your AI projects
Ready-to-paste prompt
from codecarbon import EmissionsTracker; tracker = EmissionsTracker(); tracker.start(); # your compute-intensive code; tracker.stop(); emissions = tracker.calculate(); print(emissions)
Heads up: Make sure you have the `google-api-python-client` library installed, as codecarbon uses the Google Cloud API to estimate emissions, and also be aware that an API key from Google Cloud is required for some features
Saves to your device
Use with Claude
New

Skip the builder — one click puts this in Claude, Cursor, Antigravity and more.

🔑 Needs an API key

Works after you add credentials — the setup agent will ask you for them.

Try it instantly — no install
Claude Code
mkdir -p ~/.claude/skills/codecarbon && curl -fsSL https://workflowstacks.com/api/skills/codecarbon/claude-skill -o ~/.claude/skills/codecarbon/SKILL.md
Open in another AI app

Opens the app with this repo with the prompt ready to go — no copy-paste needed.

Connect the whole catalog (MCP)
claude mcp add --transport http workflowstacks https://workflowstacks.com/api/mcp

Adds a WorkflowStacks connector to Claude Code: search and load any skill here by chatting.

How Codecarbon works
Codeflow
Free to inspect

Codecarbon is a large Python project (~31k lines across 284 code files, plus 129 test files). Setup is light: installs like a normal app — add your API keys. Reading the code is optional. Last commit this month, MIT license, has a test suite.

Size
Large codebase
~31k lines · 284 code files · ~4 h to skim
Setup
One-command install
Installs like a normal app — add your API keys. Reading the code is optional.
Runs on
Python · Docker
Needs API keys (.env)
Python 78%TypeScript 21%
Where to start reading
  1. 1
    README.md
    Start here — what it does and how to install it
  2. 2
    AGENTS.md
    The instructions the AI actually follows
  3. 3
    carbonserver/main.py
    Where the program starts running
  4. 4
    pyproject.toml
    Dependencies and the commands it exposes
  5. 5
    .env.example
    The API keys and settings you must provide
What's in each folder
codecarbon/Core code — the actual logic108 files
docs/Documentation63 files
examples/Examples you can copy53 files
webapp/Folder142 files
carbonserver/Folder139 files
deploy/Deployment / infrastructure18 files
benchmarks/Evaluations & benchmarks6 files
docker/Deployment / infrastructure6 files
READMEHas testsDocumentedCI checksDocker readyExamples includedMIT licenseUpdated this month
Quick Actions
Details
Creator
mlco2
Language
Python
Category
ai-agent
Published
5/12/2020

Are you the creator of this tool? Claim your listing → and earn 85% of every sale.