AI

Love AI Coding but Feel Guilty About the Planet? Keep Coding, on Clean Energy

Using Claude Code, Codex or Cursor and feeling guilty about AI's energy use? You don't have to quit. Here's the honest footprint of coding agents and a 5-minute setup that runs them on renewable energy.

If you code with Claude Code, Codex, Cursor or another AI agent, you’ve probably felt it: a small pang every time you hand it another task. AI runs on data centers, data centers run on electricity, and a lot of that electricity still comes from gas and coal.

Here’s the good news: you don’t have to choose between AI coding and caring about the planet. Most of the footprint comes down to two things you can change in about five minutes: where the computing runs, and how much of it you use.

The honest footprint

  • One AI answer is small. Google measured its median Gemini text prompt at about 0.24 watt-hours, which Google compares to watching TV for less than nine seconds.
  • Coding agents multiply it. To fix one bug, an agent might read files, search, edit, run tests and try again: dozens of model calls, each resending the code it has read so far. That makes agents the heaviest everyday use of AI most developers have.
  • The source of the electricity matters as much as the amount. The same task run in a data center on hydro and wind power has a far smaller footprint than one on a gas-heavy grid.

So the fix isn’t guilt. It’s choosing clean computing and not wasting it. More detail in the environmental footprint of AI coding agents.

Option 1: Keep Claude Code, change what powers it

If you like Claude Code, keep it. Claude Code can send its requests to the Viro API instead, and everything else stays the same: your CLAUDE.md, skills, MCP servers and habits.

  • Pick viro/clean or Kimi K2.7 Code and every turn runs on open models in data centers powered by 100% renewable energy.
  • Want Claude itself for a hard problem? Choose Claude Sonnet 5 through Viro: its electricity is matched with renewables and clearly labelled.

Setup takes a few minutes with the Viro plugin: how to run Claude Code on clean energy.

Option 2: Try OpenCode, free and open source, on clean energy

OpenCode is a free, open-source coding agent that works a lot like Claude Code, as a desktop app or in the terminal. It lets you choose any AI provider, which makes it a natural fit for clean energy. If you’re newer to coding agents, it’s the easiest place to start.

You don’t need to edit any config files:

  1. Install OpenCode from opencode.ai. It works straight away on its own free models.
  2. Get a Viro API key at console.viro.app. New accounts get $0.25 of free credit.
  3. Open a new session in OpenCode and paste this prompt. OpenCode sets itself up:
Set yourself up to use the Viro API as your default model provider. This is about your own OpenCode settings, not this project: don't add Viro to any project files.

1. Read the Viro guide for OpenCode and follow it: https://console.viro.app/docs/integrations/opencode.md
2. My API key comes first. Don't ask me to paste it into this chat. Create the file ~/.config/opencode/viro-key, make it readable only by me, and open it for me in a text editor (Mac: open -e, Windows: notepad, Linux: xdg-open). Then stop and wait until I tell you I've pasted my key and saved the file.
3. When I say I'm done, check the key: send one short request to https://api.viro.app/v1/chat/completions with model viro/clean, reading the key from that file without printing it. Tell me if it worked.
4. Only if the key works: add Viro to my global OpenCode config (~/.config/opencode/opencode.json) the way the guide shows, with apiKey set to {file:~/.config/opencode/viro-key}. Make viro/clean the default model and viro/gpt-oss-20b the small model. Keep any providers I already have.
5. Finally, tell me exactly how to switch over (restart OpenCode or start a new session) and how I'll know it worked.

It opens a private file in your text editor for your key, so the key never goes into the chat. Paste the key, save, type done, and it checks the key and switches itself over. Then restart OpenCode and start a new session: answers labelled build · clean are running on renewable energy.

The full walkthrough, with what to expect at each step and what to do if something goes wrong: how to set up OpenCode on clean energy.

Three habits that cut the rest

  1. Use a small model for small jobs. Renaming, docs and commit messages don’t need the biggest model. In OpenCode, switch with /models.
  2. Start fresh for a new task. Long sessions resend everything that came before. A new session for a new task is faster and lighter.
  3. Be specific. “Fix the failing test in auth.test.ts; the token expiry is off by one” takes far fewer steps than “tests are broken”.

Let go of the guilt, keep the care

Feeling uneasy about AI’s footprint means you’re paying attention, and that’s a good thing. Put it into choices that add up: clean computing, fewer wasted steps, tools that tell you what they use. Then get back to building.

Get a free Viro API key · Set up OpenCode · Set up Claude Code

Frequently asked questions

Is using Claude Code bad for the environment?

A single AI answer uses little energy, but coding agents make many model calls per task and resend growing amounts of code each time, so they are among the heaviest everyday uses of AI. How much that matters depends mostly on how much computing you use and where the electricity comes from.

Can I use Claude Code on clean energy?

Yes. Claude Code can be pointed at the Viro API, which runs open models such as Kimi K2.7 Code in data centers powered by 100% renewable energy. You keep your CLAUDE.md, skills and MCP servers. If you choose Claude models through Viro, their electricity is matched with renewables and labelled.

What is OpenCode?

OpenCode is a free, open-source AI coding agent, similar to Claude Code, that runs as a desktop app or in the terminal. It works with any OpenAI-compatible provider, so you can run it on renewable-powered models.

Is OpenCode free?

The OpenCode app is free and open source. You pay for the AI models you use through it. A new Viro account includes $0.25 of free credit, and Viro's open models start at a few cents per million tokens.

Does Viro use carbon offsets?

No. Viro's own models run in data centers powered by renewable energy in Iceland, Norway, Finland and Ireland. Partner models like Claude and GPT are energy matched: Viro funds the same amount of renewable electricity they use, and labels them so you always know which is which.

Sources

  1. How much energy does Google’s AI use? We did the math, Google Cloud, August 2025

Cover photo by Colin Watts on Unsplash

Chat with AI that funds clean energy

Viro AI is free on web, iPhone, Android, Mac and Windows.

Try Viro AI