npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, πŸ‘‹, I’m Ryan HefnerΒ  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you πŸ™

Β© 2026 – Pkg Stats / Ryan Hefner

ai-burn

v0.4.1

Published

πŸ”₯ COβ‚‚, water and money burned by your AI coding tools (Claude Code, Gemini CLI, Codex, Cursor, OpenCode). One command, fully local.

Readme

πŸ”₯ ai-burn

What did your AI actually burn?

The COβ‚‚, water and money your AI coding tools quietly torched β€” in one command, fully local, nothing uploaded.

npm downloads node license network

npx ai-burn
  πŸ”₯ ai-burn β€” what your AI burned (all time)

  9.82 kg COβ‚‚e   Β·   49.1 L of water   Β·   $709.55 at API prices

  πŸš™ Daily Commuter
  β–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 15% to πŸš› Diesel Hauler (20 kg)

  That's like…
  πŸš— 58 km in a petrol car
  πŸ” 3.9 cheeseburgers
  🎈 545 party balloons of pure COβ‚‚
  🧊 295 cm² of Arctic sea ice, gone

  …and your machines drank
  β˜• 1.64k espresso shots, evaporated
  πŸ₯€ 98 half-litre bottles
  🌊 0.000000000055% of Lake Geneva

  By tool
  ✳️ Claude Code β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘    8 kg  81%  $664.00
  πŸ”“ OpenCode    β–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 1.73 kg  18%   $40.75
  πŸŒ€ Codex CLI   β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘  56.1 g   1%    $2.79
  πŸ–±οΈ Cursor      β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘  28.3 g   0%    $1.77 β‰ˆ
  β™Š Gemini CLI  β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘  4.31 g   0%    $0.24

  ⚑ 20 kWh   πŸ”€ 1.02B tokens   πŸ“… 23.9 g/day   πŸ”₯ peak day: 1.91 kg (Jun 6)
  πŸ† top model: claude-opus-4-8 (43%)

  Rough estimates β€” run with --json for raw numbers, README for methodology.

Everything runs locally: it reads the session history your AI tools already keep on disk, counts your tokens, and converts them to energy, emissions, water and money. Nothing is uploaded anywhere β€” ai-burn never makes a network request. The output is information, plain and simple: what you do with it is up to you.

πŸ‡«πŸ‡· Parle aussi franΓ§ais β€” --lang fr (auto-detected from your locale).

🌐 Website Β· πŸ”¬ Methodology Β· πŸ”’ Privacy Β· ⭐ Star this repo

Supported tools

| Tool | Where it reads | Token counts | | --- | --- | --- | | ✳️ Claude Code | ~/.claude/projects/**/*.jsonl | exact (per API turn) | | β™Š Gemini CLI | ~/.gemini/tmp/*/chats/*.json | exact | | πŸŒ€ Codex CLI | ~/.codex/sessions/**/*.jsonl | exact | | πŸ–±οΈ Cursor | …/Cursor/User/globalStorage/state.vscdb | exact tokens, model unknown (β‰ˆ) | | πŸ”“ OpenCode | ~/.local/share/opencode/opencode.db | exact (+ its own cost figures) |

Cursor and OpenCode are SQLite databases, so those two need the sqlite3 CLI on your PATH (preinstalled on macOS; apt/dnf install sqlite3 elsewhere). Missing tools are silently skipped. Using something we don't read yet? PRs welcome β€” a source is ~60 lines in src/sources/.

Options

| Flag | Effect | | -------------- | --------------------------------------------------- | | --days <n> | Only count the last n days | | --tools <ids>| Subset of claude,gemini,codex,cursor,opencode | | --lang <code>| Report language: en, fr (default: your locale) | | --json | Machine-readable output (always English keys) | | --no-color | Plain text (NO_COLOR also respected) | | -y, --yes | Skip the confirmation prompt |

Privacy & safety

  • Asks first. Before reading anything, ai-burn asks for a Y/n confirmation in your terminal (skip with --yes; non-interactive runs proceed, since there is no one to ask).
  • Fully local. No network access at all β€” zero HTTP requests, no telemetry, no analytics, nothing phones home. The only runtime dependency is Node's standard library (plus the sqlite3 CLI for two of the sources).
  • Never touches credentials. The tool databases it reads also contain auth tokens (e.g. OpenCode's account table). The queries here only read chat/usage rows β€” never auth tables, never auth.json, never key files.
  • No content leaves the math. Your prompts and code are never parsed for meaning, stored, or displayed β€” only token counts, models and timestamps.

Methodology (a.k.a. how wrong is this?)

Vendors publish almost no per-token energy figures, so this is an estimate, triangulated from public LLM-inference studies (Epoch AI's GPT-4o estimate, Google's Gemini per-prompt disclosure, Mistral's Large 2 lifecycle report):

  1. Tokens are read per API turn from each tool's local history and deduped across resumed/forked/checkpointed sessions.
  2. Energy: each model gets a Wh-per-million-tokens rate by tier (frontier β€” Opus/Fable-class: 1200 Wh/M output; standard β€” Sonnet/GPT-5/ Gemini-Pro-class: 500; light β€” Haiku/Flash/mini-class: 100). Input tokens count at 1/10 of the output rate (prefill is much cheaper), cache reads at 1/100, cache writes like input. Datacenter overhead (PUE) of 1.2 applies.
  3. Carbon: 0.4 kg COβ‚‚e per kWh (world-average grid mix).
  4. Water: 2.0 L per kWh β€” on-site evaporative cooling (~1.1 L/kWh, Google's fleet WUE) plus water consumed generating the electricity (~0.9 L/kWh). See Making AI Less Thirsty (Li et al., 2023).
  5. Money: retail pay-as-you-go API list prices per model (src/pricing.js), with cache reads at ~0.1Γ— and cache writes at ~1.25Γ— the input price β€” i.e. what your usage would cost if you weren't on a subscription. OpenCode records its own per-message cost; we trust it when present.

Real numbers depend on hardware, batching, datacenter location, grid mix and the phase of the vendor's pricing moon β€” expect the truth to be within a factor of a few, in either direction. All constants live in src/co2.js and src/pricing.js; PRs with better-sourced numbers are welcome.

License

MIT β€” made by ThΓ©ophile J-R.