Scan your project and get a Green Score

March 26, 2026 · View on GitHub

CarbonLint — Open Source Carbon Footprint Developer Tool

CarbonLint

The open-source carbon footprint monitoring tool for developers.
Track, measure, and reduce the energy consumption and CO₂ emissions of your software — in real time.

carbonlint-cli npm version MIT License CarbonLint Documentation GitHub Actions Build Status


What is CarbonLint?

CarbonLint is a free, open-source developer sustainability tool that monitors your software's energy consumption and calculates its carbon footprint in real time. It works as both a desktop application (built with Tauri and Rust) and a CLI tool (published on npm as carbonlint-cli) that integrates directly into CI/CD pipelines.

Software accounts for a growing share of global energy use. CarbonLint helps developers build greener software by providing visibility into the environmental cost of their code — from CPU and memory usage to estimated CO₂ emissions per coding session.

Why CarbonLint?

  • Visibility — Most developers have no idea how much energy their code consumes. CarbonLint makes this invisible cost visible.
  • Actionable — Get a Green Score (0–100) for any project in seconds with region-specific carbon intensity data.
  • Automated — Set carbon budgets in CI/CD to catch regressions before they ship.
  • Lightweight — The desktop app uses < 5 MB RAM. The CLI has zero native dependencies.

Key Features

FeatureDescription
📊 Real-time system monitoringTrack CPU, memory, disk I/O, network, and GPU usage live
🌱 Carbon footprint calculationConvert energy consumption to CO₂ using region-specific grid intensity
Profiling sessionsStart/stop recording with Ctrl+Shift+P — get per-session energy breakdowns
📈 Weekly eco-reportsVisualized trends of your coding sessions' environmental impact
🔌 CI/CD carbon budgetsFail builds that exceed emission thresholds with carbonlint --ci
🖥 Cross-platformWindows, macOS, Linux, and Android — one codebase, consistent UX
🔋 System tray modeLightweight background process with global hotkey support
📦 npm CLInpm install -g carbonlint-cli — scan projects from the terminal

How It Works

CarbonLint calculates carbon emissions using a three-step model:

  1. Measure energy — The desktop app reads hardware telemetry (CPU load, memory, disk, network) via Rust's sysinfo crate. The CLI estimates energy from file analysis.
  2. Apply carbon intensity — Energy (kWh) is multiplied by the grid carbon intensity of your region (gCO₂/kWh). Sweden emits 25g per kWh; India emits 700g.
  3. Score and report — A Green Score (0–100) summarizes your project's sustainability. Carbon budgets flag regressions.

Project Architecture

carbonlint/
├── tauri-dashboard/     # Desktop app — Tauri 2 + React + Rust
│   ├── src/             #   React frontend (Dashboard, Reports, CI/CD, Settings)
│   └── src-tauri/       #   Rust backend (sysinfo, carbon calc, tray, hotkeys)
├── carbonlint-cli/      # CLI tool — Node.js, published on npm
│   ├── bin/             #   Entry point (carbonlint command)
│   └── src/             #   Scanner, reporter, config, data
├── docs/                # Documentation website — Vite + React + Tailwind CSS
└── .github/workflows/   # GitHub Actions CI/CD build pipeline
ComponentBuilt With
Desktop AppTauri 2, Rust, React 19, TypeScript, sysinfo
CLI ToolNode.js 16+, Commander, Chalk, Ora
DocumentationVite, React, Tailwind CSS v4

Quick Start

npm install -g carbonlint-cli
# Initialize a config file in your project
carbonlint init

# Scan your project and get a Green Score
carbonlint .

# Scan with a specific region
carbonlint . --region EU-NORTH

# CI/CD mode — exit code 1 if carbon budget exceeded
carbonlint . --ci --budget 50

# JSON output for pipeline parsers
carbonlint . --json

Download the Desktop App

Download CarbonLint for Windows, macOS, Linux, or Android from the Downloads page.

Or build from source:

cd tauri-dashboard
npm install
npm run tauri dev

Carbon Intensity Regions

CarbonLint uses region-specific electricity grid carbon intensity data to calculate emissions accurately. The same data is shared between the desktop app and CLI:

Region KeyLocationCarbon Intensity (gCO₂/kWh)Notes
EU-NORTHSweden25Cleanest — mostly hydro and nuclear
US-WESTCalifornia210Solar and wind mix
EU-WESTIreland300Wind + gas mix
US-EASTVirginia380Data center hub, heavier fossil
ASIA-EASTJapan470Nuclear + fossil
GLOBAL-AVGGlobal Average475Default if no region specified
ASIA-SOUTHIndia700Coal-heavy grid

Tip: Set your region in .carbonlintrc.json or with --region for accurate results. Running in Sweden vs India can differ by 28x for the same code.

CI/CD Integration

GitHub Actions

name: Carbon Audit
on: [push, pull_request]

jobs:
  carbon-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - name: Install CarbonLint CLI
        run: npm install -g carbonlint-cli
      - name: Run carbon audit
        run: carbonlint . --ci --budget 100 --region GLOBAL-AVG

GitLab CI

carbon-audit:
  image: node:20-slim
  stage: test
  script:
    - npm install -g carbonlint-cli
    - carbonlint . --ci --budget 100
  allow_failure: false

Jenkins Pipeline

stage('Carbon Audit') {
    steps {
        sh 'npm install -g carbonlint-cli'
        sh 'carbonlint . --ci --budget 100'
    }
}

Keyboard Shortcuts

ShortcutActionScope
Ctrl+Shift+P (⌘+Shift+P on Mac)Start / Stop profilingGlobal
Ctrl+Shift+D (⌘+Shift+D on Mac)Show / Hide dashboardGlobal

Right-click the system tray icon for additional controls: Start/Stop Profiling, Show/Hide, and Quit.

Configuration

Both the desktop app and CLI share the same configuration format. Create .carbonlintrc.json with carbonlint init:

{
  "region": "GLOBAL-AVG",
  "hardwareProfile": "laptop",
  "pue": 1.0,
  "maxCarbon": 100,
  "failOnThreshold": false
}
OptionTypeDefaultDescription
regionstringGLOBAL-AVGGrid carbon intensity region
hardwareProfilestringlaptopHardware type: laptop, desktop, or server
puenumber1.0Power Usage Effectiveness (data centre overhead factor)
maxCarbonnumber100Carbon budget in grams
failOnThresholdbooleanfalseExit 1 when budget exceeded (for CI/CD)

Development

Prerequisites

Desktop App

cd tauri-dashboard
npm install
npm run tauri dev        # Start dev server with hot reload
npm run tauri build      # Build production binaries

CLI Tool

cd carbonlint-cli
npm install
node bin/carbonlint.js . # Run locally without global install

Documentation Site

cd docs
npm install
npm run dev              # http://localhost:5173/carbonlint/
npm run build            # Static build for deployment

Frequently Asked Questions

What is carbon footprint monitoring for software?

Carbon footprint monitoring for software measures how much energy your code consumes during development and in production, then converts that energy usage into CO₂ equivalent emissions using regional grid carbon intensity data.

How accurate is CarbonLint?

The desktop app reads real hardware telemetry (CPU utilization, memory, disk I/O) with ±2% accuracy via Rust's sysinfo crate. The CLI provides estimates based on file analysis — useful for CI/CD gating but less precise than real-time hardware monitoring.

Is CarbonLint free?

Yes. CarbonLint is 100% free, open-source, and MIT licensed. There are no paid tiers, no telemetry, and no data collection.

What platforms does CarbonLint support?

CarbonLint runs on Windows (10+), macOS (10.15+, Intel & Apple Silicon), Linux (Debian, Ubuntu, AppImage), and Android (8.0+). The CLI runs anywhere Node.js runs.

How does CarbonLint compare to other green coding tools?

CarbonLint is one of the first tools to combine real-time hardware monitoring with CI/CD carbon budgeting in a single, free, cross-platform package. Unlike cloud-only solutions, it works entirely offline and runs locally on your machine.

Can I use CarbonLint in CI/CD pipelines?

Yes. Install the CLI with npm install -g carbonlint-cli, then run carbonlint . --ci --budget 100 in your pipeline. It exits with code 1 if the carbon budget is exceeded, which fails the build.

ResourceURL
🌐 Websitenishal21.github.io/carbonlint
📦 npm Packagenpmjs.com/package/carbonlint-cli
🐛 Issuesgithub.com/nishal21/carbonlint/issues
📖 DocumentationCarbonLint Docs
🪞 Mirrorcarbonlint.netlify.app

Contributing

Contributions are welcome! Please open an issue first to discuss what you'd like to change.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT © Nishal K


Made with 💚 for a greener future.
CarbonLint — sustainable software development, carbon footprint tracker, green coding, eco-friendly developer tools