<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Beau Sterling</title>
    <description>The latest articles on DEV Community by Beau Sterling (@beausterling).</description>
    <link>https://dev.to/beausterling</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3314838%2Fd5f13891-e725-4439-83d6-f73f9a24dec7.jpeg</url>
      <title>DEV Community: Beau Sterling</title>
      <link>https://dev.to/beausterling</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/beausterling"/>
    <language>en</language>
    <item>
      <title>How much water does Claude Code use? I built a CLI to measure it</title>
      <dc:creator>Beau Sterling</dc:creator>
      <pubDate>Fri, 02 Oct 2026 15:50:34 +0000</pubDate>
      <link>https://dev.to/beausterling/how-much-water-does-claude-code-use-i-built-a-cli-to-measure-it-16in</link>
      <guid>https://dev.to/beausterling/how-much-water-does-claude-code-use-i-built-a-cli-to-measure-it-16in</guid>
      <description>&lt;p&gt;My AI coding agents used about &lt;strong&gt;47.8 litres of water in September&lt;/strong&gt;. That's roughly eight toilet flushes, and it's an estimate with a wide range. Here's how I got the number, and the open-source CLI I built to track it live.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/beausterling" rel="noopener noreferrer"&gt;
        beausterling
      &lt;/a&gt; / &lt;a href="https://github.com/beausterling/drip-ai-water-usage" rel="noopener noreferrer"&gt;
        drip-ai-water-usage
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      How much water is your AI agent drinking? Live water-usage meter for Claude Code &amp;amp; Codex CLI — status line, split-pane meter, research-backed estimates.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;drip 💧&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;How much water is your AI agent drinking?&lt;/strong&gt; drip estimates the water used by
terminal AI agents (Claude Code and Codex CLI) and shows it live in your status
line, a split-pane meter, or a full breakdown page, with every number traced
back to published research.&lt;/p&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;Opus 5.5 │ my-project │ ████░░░░░░ 48% │ 💧 412 mL (1.7 glasses) · today 3.1 L
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Real token counts.&lt;/strong&gt; drip reads your agent's local logs, so the token counts aren't guesses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Research-backed coefficients.&lt;/strong&gt; Low, mid and high estimates, each with its source cited.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Private.&lt;/strong&gt; Everything is local: no accounts, no telemetry, and nothing leaves your machine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No dependencies.&lt;/strong&gt; Python 3.11+ standard library only.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Install&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;git clone https://github.com/beausterling/drip-ai-water-usage.git &lt;span class="pl-k"&gt;~&lt;/span&gt;/.drip
&lt;span class="pl-k"&gt;~&lt;/span&gt;/.drip/bin/drip install&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;code&gt;install&lt;/code&gt; plays a short intro, imports your existing Claude Code and Codex
history, puts &lt;code&gt;drip&lt;/code&gt; on your PATH (via &lt;code&gt;~/.local/bin&lt;/code&gt;), and turns on the Claude
Code status line…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/beausterling/drip-ai-water-usage" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  Why water?
&lt;/h2&gt;

&lt;p&gt;Every Claude Code or Codex request runs on GPUs in a data center. Water gets used twice:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;On site:&lt;/strong&gt; evaporative cooling. Data centers report this as WUE (litres per kWh).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Off site:&lt;/strong&gt; the power plants that generate the electricity also consume water (EWIF, litres per kWh generated).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The second one is usually bigger. In drip's mid estimate it's about 88% of the total.&lt;/p&gt;

&lt;h2&gt;
  
  
  The formula
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;water (mL) = tokens × energy per token (Wh) × water per kWh (L/kWh)
water per kWh = WUE / PUE  +  EWIF
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tokens&lt;/strong&gt; are exact. drip reads the logs your agent already writes: &lt;code&gt;~/.claude/projects/**/*.jsonl&lt;/code&gt; for Claude Code and &lt;code&gt;~/.codex/sessions/**&lt;/code&gt; for Codex CLI. It counts input, output, cache-read and cache-write tokens separately and dedupes by message id.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Energy per token&lt;/strong&gt; comes from measured inference energy (ML.ENERGY, Microsoft's study in &lt;em&gt;Joule&lt;/em&gt;, Google's disclosure). Output tokens cost far more than input, and cache reads are a small fraction of input. Models are scaled by list price, the only public proxy for how expensive a model is to serve.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Water per kWh&lt;/strong&gt; comes from Lawrence Berkeley National Lab's 2024 US data center report and Li et al., &lt;em&gt;Making AI Less Thirsty&lt;/em&gt; (CACM 2025). Mid estimate: about 3.6 L/kWh including generation, about 0.4 L/kWh on site only.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How accurate is it?
&lt;/h2&gt;

&lt;p&gt;Token counts: exact. Water: maybe 3–5× off in either direction, and the low-to-high span is 10–30×, because no provider publishes energy per token. So drip shows a range everywhere instead of a falsely precise number. It's good for trends ("I used 3× more this week") and bad for exact litres.&lt;/p&gt;

&lt;p&gt;The biggest unknown is cache reads. They're most of an agent's tokens, and nobody knows exactly what they cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it looks like
&lt;/h2&gt;

&lt;p&gt;In Claude Code, a segment in the status line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Opus 5.5 │ my-project │ ████░░░░░░ 48% │ 💧 412 mL (1.7 glasses) · today 3.1 L
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For Codex or any other agent, &lt;code&gt;drip run codex&lt;/code&gt; opens a split pane with a live meter (a little ASCII bottle that fills up) in Ghostty, Warp, iTerm2, tmux or macOS Terminal.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;drip open&lt;/code&gt; shows a breakdown page: per model, per token type, the uncertainty range, 30 days of history, every coefficient linked to its source, and a share card.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsff5ki1w8b646g1rrd9n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsff5ki1w8b646g1rrd9n.png" alt="drip breakdown page" width="800" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/beausterling/drip-ai-water-usage.git ~/.drip
~/.drip/bin/drip &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Python 3.11+, standard library only, nothing leaves your machine. MIT licensed.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd love help with
&lt;/h2&gt;

&lt;p&gt;If you have better data on per-token inference energy, especially for cache reads, open an issue. The coefficients live in one TOML file, and since drip stores tokens rather than water, updating them re-prices your whole history.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>showdev</category>
      <category>opensource</category>
      <category>python</category>
    </item>
  </channel>
</rss>
