claude-carbon: the CO2 and API-equivalent cost of each Claude Code session, live

0 comments

Apps it uses

I use Claude Code most of the day and had no idea what it weighed in energy. So I built a small plugin, claude-carbon, that reads the token counts Claude Code already writes on my machine and turns them into a CO2 estimate, shown next to the session's API-equivalent cost. It's for anyone who uses Claude Code regularly and wants to see where the footprint comes from.

  1. Install once. In the Code tab of the Claude desktop app, paste one message and Claude runs the installer for you. In a terminal, it's one command.
  2. Work as usual. The status line (or the line under the prompt in the desktop app) shows the session's gCO2 and $ as it grows.
  3. Once a week, I run /carbon-report to see which projects and models weigh the most. /carbon-card makes a shareable image.

What I learned: in October, 98% of my tokens were context that Claude re-reads at every step. Each one weighs little, but together they made about 60% of the CO2. So I changed my habit: one session per task instead of one for the whole day, and /clear when the subject changes.

Disclosure: I built it. Free, MIT, no account, nothing leaves the machine. The numbers are estimates from published factors, with their limits written down in the repo.

github.com/gwittebolle/claude-carbon

0 comments

Have a question about this workflow, or a way to improve it?

Log in to comment Create a free account

No comments yet. Ask the first question or say what worked for you.

Posting guidelines