Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>CodePrintNew to Visual Studio Code? Get it now.
CodePrint

CodePrint

Genis Mas

| (0) | Free
See the environmental footprint of your AI-assisted coding. CodePrint turns GitHub Copilot, Claude Code and Codex activity into energy, CO₂e and water estimates, with a pixel-art planet that reacts as you work. Fully local, no telemetry.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info
CodePrint logo

CodePrint

A live environmental monitor for AI-assisted software development

VS Marketplace Build Status VS Code TypeScript Telemetry

⭐ If you like this project, star it on GitHub — it helps a lot!

Overview • Features • Getting started • Usage • How estimates work • Privacy • Troubleshooting

CodePrint is a VS Code extension that turns your AI coding activity into understandable environmental impact estimates. It reads the local session logs of the AI tools you already use, estimates the energy, CO₂e and water behind each request, and shows it all in the sidebar alongside a reactive 16-bit pixel world that comes alive whenever an AI model is working for you.

Everything runs and stays on your machine: no API keys, no telemetry, no network requests.

CodePrint in VS Code: the sidebar with the pixel planet, live activity and today's footprint with everyday comparisons, next to the Details panel showing CO₂e and water for today, the last 30 days, the previous month and a projected year

Sample data. The planet shows real day and night for the current time.

[!IMPORTANT] CodePrint provides estimates, not direct measurements. Real impact depends on model infrastructure, hardware, location, batching, caching and provider operations. Every figure carries a confidence level and the reasons behind it. See the methodology for formulas, factors, sources and limitations.

Overview

Tokens, watt-hours and grams of CO₂e are abstract. CodePrint makes them tangible: when you send a prompt, a data center in the sidebar powers up, electricity flows down the power line, cooling fans spin and data packets travel back to a pixel developer at their desk. The bigger the model and the request, the busier the scene. When nothing is happening, the world stays calm.

The goal is awareness, not guilt: CodePrint does not discourage AI usage, score your prompts or track your productivity. It helps you answer a few simple questions:

  • Which AI tools and models am I using, and how much?
  • What is their estimated environmental impact today?
  • What is happening right now?
  • How confident is each estimate?
flowchart LR
  A[Local session logs] --> B[Provider adapters]
  B --> C[Usage events]
  C --> D[Impact engine]
  D --> E[(Local SQLite)]
  C --> F[Pixel world]
  D --> G[Sidebar and Details]

Supported tools

Tool Local source (override) Token counts Versions checked
GitHub Copilot Chat workspaceStorage/*/chatSessions/*.jsonl and globalStorage/emptyWindowChatSessions of the running VS Code (all workspaces) prompt and completion per request VS Code internal format
Claude Code ~/.claude/projects/**/*.jsonl (CLAUDE_CONFIG_DIR, XDG_CONFIG_HOME/claude) input, output, cache read and cache write per API response 2.1.260–2.1.284
GitHub Copilot CLI ~/.copilot/session-state/<id>/events.jsonl (COPILOT_HOME, XDG_CONFIG_HOME/.copilot) output per model call; input and cache totals at session shutdown 0.0.384–1.0.91
Codex CLI ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl (CODEX_HOME) input, cached input and output per turn 0.130–0.159

Each provider starts, stops and fails independently, so one broken log format never takes the others down.

Usage from every project is tracked, whichever VS Code window or terminal it comes from. When CodePrint starts, it imports in the background the usage logged since it last ran. The first time, it imports whatever history your tools' local logs still hold, up to codeprint.dataRetentionDays (at most a year), so the last month and the 30-day view aren't empty. Imported requests count towards totals and history, but don't animate the world. A period from before your tools' logs begin shows "no data" instead of zero.

Features

  • Multi-tool tracking: GitHub Copilot Chat, Claude Code, GitHub Copilot CLI and Codex CLI, read from their local session logs.
  • Reactive 16-bit world: idle, request starting, light/medium/heavy processing, response and failure states.
  • Live metrics: active provider, model and tokens, a last-hour activity chart, session counters and per-tool shares.
  • Everyday comparisons: CO₂e and water for today, the last 30 days, the previous month and a projected year, each shown as km driven, kettle boils, mugs of tea, shower minutes and more.
  • Transparent estimates: per-model figures with High/Medium/Low confidence and the reasons behind each one.
  • Versioned methodology: every stored request records the methodology version used, so figures stay reproducible.
  • Three visual modes: environmental, neutral or minimal, plus FPS cap, reduced-motion support and pause when hidden.
  • Local-first and private: SQLite history with configurable retention, one-click data clearing and a redacted diagnostics report.

Getting started

Install

Install CodePrint from the Visual Studio Marketplace, or run this in the Command Palette (Ctrl+P):

ext install geniussmr.vscode-codeprint

Then select the CodePrint fingerprint icon in the Activity Bar. Usage from tools you already use appears within a few seconds.

Requirements

  • VS Code 1.138 or later (CodePrint uses the built-in node:sqlite, no native modules).
  • At least one supported tool installed and used on the same machine as the VS Code extension host.
  • To build from source: Node.js LTS and Git.

Run from source

  1. Clone the repository and install dependencies:

    git clone https://github.com/geniussmr/codeprint.git
    cd vscode-codeprint
    npm install
    
  2. Open the folder in VS Code and press F5 (Run Extension) to start an Extension Development Host.

  3. Select the CodePrint fingerprint icon in the Activity Bar, or run CodePrint: Open. The dashboard opens automatically alongside the compact live monitor. CodePrint: Open Dashboard in Editor also opens it directly.

  4. Send a request with any supported tool and watch the world react.

[!TIP] Installed a tool after CodePrint started? It is detected within about 30 seconds, or run CodePrint: Refresh Usage to check right away.

Usage

The pixel world

One small planet: the Earth seen from space. Day and night follow the real sun, city lights come on along the night side, clouds drift and the moon shows its real phase. The original geography rotates slowly inside a crisp cyan atmosphere, against a sparse, layered starfield. A pin marks your place, taken from your timezone; it never leaves your machine. Requests arc over the planet to a data center drawn at one of the regions where cloud data centers cluster. It is illustrative, not where your requests actually ran. See docs/WORLD_ART.md for the art direction.

State What you see
Idle The planet, your pin and a quiet data center; stars twinkle and now and then a satellite passes.
Request starting A short cyan pulse surrounds Earth; your pin lights up and a light runs along the arc when the markers face the viewer.
Processing Reported in-flight requests show a Generating status and up to four orbital pixels. The existing data-center artwork follows the rotating geography when visible.
Response A brief green pixel ring expands and fades; the reply follows the visible arc.
Failure The data center shows a slow amber light and the request stops halfway; nothing red, nothing alarming.

Claude Code and Copilot CLI generally report completed calls. Consecutive completions show Recent activity, without inventing an active request count or continuous processing effects. Generating requires reported in-flight requests. Closely spaced events may share one animation because the world sends aggregate transitions.

Hover or focus Earth for tracking/provider information and available session counters, including explicitly estimated CO₂e. Click it, or press Enter/Space, to open the existing dashboard. Escape dismisses the tooltip. Tracking paused or unavailable clears activity effects and keeps a still planet visible. Reduced motion and disabled animation freeze rotation/clouds and remove pulses/orbital particles; minimal mode keeps text only. The renderer caches space, bounds globe geometry, sleeps at about one frame per second while idle, and respects the configured frame-rate cap (30 FPS by default). Hidden views stop scheduling frames.

The main CodePrint view

The native sidebar is a compact live monitor sized for VS Code's available width. Selecting CodePrint automatically opens the eight-section dashboard in an editor tab, with a single navigation menu and room for charts and tables. Open Dashboard → can reopen it after you close the tab; live tracking updates never reopen it or take editor focus.

  • Live companion: the pixel Earth, latest provider/model, recent token activity, session counters and estimated impact.
  • Overview: KPI cards, charts, provider breakdown, optional goals, all twelve equivalents and local insights.
  • Footprint over time: Today, Last 30 days, Previous month and Projected year, with the original carbon and water comparisons. Expand daily detail for model confidence and provider token shares.

Open Dashboard in Editor opens the same analytics workspace directly from the Command Palette. Both surfaces receive the existing local tracking updates.

Intensity is the heavier of two signals: the model class (small → light, medium → medium, frontier → heavy) and the request size (8,000+ tokens → medium, 40,000+ tokens → heavy). In environmental mode, heavy processing also makes the sky briefly more industrial.

Commands

Command Description
CodePrint: Open Opens the dashboard directly alongside the compact native monitor (existing ID: codeprint.openSidebar).
CodePrint: Refresh Usage Re-reads provider logs now and re-checks tools that were not detected.
CodePrint: Open Dashboard in Editor Opens the analytics dashboard in an editor tab (existing ID: codeprint.showDetails).
CodePrint: Show Methodology Shows the factors, assumptions, limitations and sources behind the estimates.
CodePrint: Clear Local Data Deletes all locally stored usage after confirmation.
CodePrint: Open Diagnostics Opens a shareable, redacted report for troubleshooting.

Settings

Setting Default Description
codeprint.visualMode environmental environmental (environmental cues), neutral (servers, power and cooling without degradation) or minimal (no complex animation).
codeprint.animation.enabled true Animate the pixel world. When off, each state shows a still frame.
codeprint.animation.maxFps 30 Animation frame-rate cap (1–60).
codeprint.dataRetentionDays 90 Days of local history to keep: 7, 30, 90, 365 or 0 (unlimited).
codeprint.dashboard.defaultRange 7d Initial range: 1d, 7d, 30d, 90d or 365d.
codeprint.dashboard.defaultMetric carbonGrams Initial chart: carbonGrams, energyWh, waterLiters, requests or tokens.
codeprint.dashboard.units auto Automatically scaled units, or base for g CO₂e, Wh and mL.
codeprint.dashboard.budgetEnabled false Enable optional user-defined awareness targets, not scientific sustainability limits.
codeprint.dashboard.dailyBudget 0 Daily target in grams CO₂e; zero leaves the target unset.
codeprint.dashboard.weeklyBudget 0 Monday-based weekly target in grams CO₂e.
codeprint.dashboard.monthlyBudget 0 Calendar-month target in grams CO₂e.
codeprint.dashboard.notifications false Nonmodal milestone and budget-threshold notifications.
codeprint.dashboard.trackingEnabled true Pause/resume reading local AI logs; retained data remains available.

Dashboard

CodePrint uses a pixel fingerprint identity, navy panels and consistent metric colors. Select the native Activity Bar icon to open the dashboard and live monitor together, or run CodePrint: Open Dashboard in Editor directly. Achievement cards preserve the original hexagonal artwork and existing unlock progress.

KPI cards use decorative pixel accents with a soft glow on hover or keyboard focus. Values and percentage comparisons come from recorded data; the main chart below shows the selected period's history. Accents respect reduced motion, animation settings and minimal/high-contrast modes.

Use the dashboard's top tabs to change sections. Expand Filters & data to choose providers, models or custom dates and inspect data completeness. Chart points show details on hover or keyboard focus; arrow keys move between points and Escape dismisses the label. Activity rows group provider/model, input/output tokens, cache counts, estimates and confidence. Large counts are compact, with exact counts in tooltips and accessible labels. The overview summarizes car, train, flight and kettle equivalents; All energy & water comparisons jumps to all twelve original comparisons below the insight banner.

  • Overview: four KPI cards, single-metric interactive charts with quick range buttons, provider distribution by request count, optional budgets and a local insight. All twelve original equivalents are visible: car/train/air travel, kettle boils, phone charges, LED hours, mugs, shower minutes, laundry loads, baths, dishwasher cycles and drinking water. Each uses its documented carbon, energy or water basis for the selected range; hover or focus for assumptions.
  • Live companion: the original pixel Earth lives in the native sidebar with provider/model, session counts and impact, recent token activity and the daily awareness goal. The fingerprint briefly illuminates on live updates; there is no additional animation loop. Existing animation, frame-rate, reduced-motion and visual-mode preferences apply. The original Today / Last 30 days / Previous month / Projected year footprint remains below the overview; today's model confidence and provider token shares are expandable beneath it.
  • Activity: request metadata, input/output/cache-read/cache-write counts when available, impact estimates, confidence and methodology version. Provider/model/date filters apply across analytics; search and sorting apply to request history. Pages contain at most 100 requests. The current extension session is shown separately; historical session IDs are not available in the stored contract.
  • Trends: its own synchronized range, metric and previous-period controls, request heatmap and expandable daily statistics table. 1D charts use hourly buckets; 7D/30D/3M use daily buckets; windows longer than 90 days use consecutive seven-day buckets anchored to the selected window. Weekly totals include only recorded days and identify partial coverage. The daily heatmap and exported statistics retain their original resolution. The selected range can be 1, 7, 30, 90 or 365 days, or an inclusive custom date range up to 365 days.
  • Comparisons: provider/model and equivalent-period totals, including estimated Wh per 1,000 reported tokens. Provider comparisons ignore the provider filter; model comparisons ignore the model filter. Models are capped at 400 rows. These estimates cannot rank model quality or productivity.
  • Achievements: First Day, Explorer, Consistent Tracker, Data Explorer and Monthly Overview. A complete month requires a recorded request on every calendar day of a completed month; this does not prove uninterrupted tracking. Day-based progress uses up to two years of retained history. Unlock timestamps persist locally.
  • Insights: deterministic rules describe distribution, activity, cache counts, completeness and eligible period changes. The latest 50 insights and dismissals persist locally.
  • Methodology: a three-step explanation followed by expandable collection, confidence, conversion-factor, assumption and source sections. All existing technical information remains available; no calculation factors changed.
  • Settings: grouped General, Tracking, Carbon budget, Appearance, Notifications and Data & privacy controls. Preferences use VS Code configuration; export CSV/JSON, open native animation/retention settings or clear local data with confirmation.

Environmental metrics are estimates. Missing counts stay unavailable; empty chart buckets mean no recorded data, not measured zero. 1D means today since local midnight; 7D/30D/3M/1Y use rolling 7/30/90/365 × 24-hour windows. 30D matches the original Last 30 days footprint. 1Y is recorded history, unlike the original Projected year, which extrapolates recent usage. Use custom calendar dates to match Previous month. Rolling comparisons use the immediately preceding elapsed-time window; Today and custom dates use local calendar arithmetic across daylight-saving changes. Daily chart buckets can include partial first and last days. Percentage changes require a nonzero baseline and sufficiently old retained history; token/impact changes additionally require complete reported counts, and environmental changes require the same single methodology version. Estimates remain scoped to available logs and may omit activity.

Budgets include all providers regardless of dashboard filters and show partial coverage explicitly. CSV and JSON exports contain aggregates, units, completeness and methodology versions, without prompts, code, paths or request IDs. Clear Local Data also removes achievements, visited analytics views and insight history/dismissals; settings remain. Retention applies to stored requests; short insight summaries and unlock records remain until cleared.

See dashboard architecture for module boundaries and data interpretation. See the calculation parity review for matching original CarbonBit periods, annual projections and separate retained histories.

How estimates work

CodePrint prefers token counts reported by each tool (actual). When a finished request has none, it estimates them from text length at ~4 characters per token (estimated). A request missing only its input or output count is partial. Text is measured in memory and never stored.

Tokens are then converted using the codeprint-impact methodology (v1.0.0):

weightedInput = inputTokens + cachedInputTokens × 0.1 + cacheCreationTokens × 1
energyWh      = weightedInput × whPerInputToken + outputTokens × whPerOutputToken
carbonGrams   = energyWh / 1000 × 480 g CO₂e/kWh
waterLiters   = energyWh / 1000 × 1.1 L/kWh
  • Energy per token depends on the model class (small, medium, frontier), anchored on ~0.3 Wh per typical query.
  • Carbon uses the 2023 global average grid intensity of 480 g CO₂e/kWh.
  • Water covers on-site data center cooling only, at 1.1 L/kWh.
  • Confidence starts from how precisely the model was matched and drops one step when token counts are estimated or partial.

[!NOTE] No published per-model energy measurements exist yet for the models CodePrint sees, so confidence currently tops out at Medium. Training, embodied hardware and your own device's energy are not included.

The full formulas, factor tables, model mapping rules and sources are in docs/METHODOLOGY.md.

Privacy and local data

CodePrint only extracts request metadata from local logs: ids, model names, timestamps, status and token counts.

What CodePrint does
Reads Local provider session logs, only for the metadata above.
Stores One row per request (provider, model, timestamps, status, token counts and their source, estimates, confidence, methodology version). Never prompts, responses, code, file names or paths.
Sends Nothing. No telemetry, no network requests. Methodology source links open only when you click them.
Logs Provider state changes and error codes in the CodePrint output channel, without conversation content.

Usage is stored in a SQLite database at <VS Code global storage>/geniussmr.vscode-codeprint/codeprint.db.

  • Requests older than codeprint.dataRetentionDays are deleted at startup, every few hours and whenever the setting changes.
  • CodePrint: Clear Local Data deletes all stored usage; settings are kept.
  • "Today" starts at local midnight; the "session" starts when CodePrint activates in the window.
  • If the database is unreadable, it is moved aside (codeprint.db.corrupt-<time>) and recreated. If it still can't be opened, usage is kept in memory for the session and a warning is shown.

Known limitations

[!WARNING] Provider log formats are internal to each tool, not public APIs, and may change between releases. Unknown fields and record types are ignored; the versions checked are listed in Supported tools.

  • Activity from before CodePrint started is imported into history but not replayed into the live world. A request that was still running when the previous run ended and is still running now is picked up once it finishes.
  • GitHub Copilot Chat: only sessions of the VS Code installation CodePrint runs in are visible (e.g. Insiders does not see Stable's chats), and cache token counts are not recorded.
  • GitHub Copilot CLI: requests show partial confidence until the session's shutdown summary adds input and cache totals. Sessions already running when CodePrint started, or that exit without a summary, never get those totals.
  • Remote windows (SSH, WSL, Dev Containers, Codespaces): logs are read on the extension host, so tools running on the other side are not seen.

Troubleshooting

  • Open the CodePrint output channel to see each provider's state: tracking, unavailable (tool not found), failed (could not start) or stopped, plus skipped malformed lines and read errors (by error code only).
  • Run CodePrint: Refresh Usage after installing or first using a tool.
  • Run CodePrint: Open Diagnostics to get a report with CodePrint, VS Code and OS versions, per-provider detection, last update times and database health. Home folder, user name and workspace names are redacted, so you can safely attach it to an issue.

Development

Script Description
npm run compile Compiles the TypeScript sources to out/.
npm run watch Recompiles on change (default build task).
npm run lint Lints src and media with ESLint.
npm test Compiles, lints and runs the test suite in a VS Code instance.

Automated tests cover the deterministic pipeline from provider adapters to views, including an end-to-end acceptance journey. VS Code and live provider integration is covered by the manual test checklist.

Resources

  • Environmental methodology: formulas, factors, confidence and sources.
  • Product requirements: vision, scope and design of CodePrint.
  • How much energy does ChatGPT use? (Epoch AI, 2025)
  • Measuring the environmental impact of delivering AI at Google scale (Google, 2025)
  • Global Electricity Review 2024 (Ember)

Acknowledgements

CodePrint is a derivative work of CarbonBit by kasuken, released under the MIT license. It reuses CarbonBit's per-request impact engine, model aliases, token parsers and equivalent factors, with changes and additions by Genis Mas. See NOTICE and the calculation parity review.

License

MIT. Copyright (c) 2026 kasuken and Genis Mas.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft