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 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.
- 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.
| Feature | Description |
|---|---|
| 📊 Real-time system monitoring | Track CPU, memory, disk I/O, network, and GPU usage live |
| 🌱 Carbon footprint calculation | Convert energy consumption to CO₂ using region-specific grid intensity |
| ⏱ Profiling sessions | Start/stop recording with Ctrl+Shift+P — get per-session energy breakdowns |
| 📈 Weekly eco-reports | Visualized trends of your coding sessions' environmental impact |
| 🔌 CI/CD carbon budgets | Fail builds that exceed emission thresholds with carbonlint --ci |
| 🖥 Cross-platform | Windows, macOS, Linux, and Android — one codebase, consistent UX |
| 🔋 System tray mode | Lightweight background process with global hotkey support |
| 📦 npm CLI | npm install -g carbonlint-cli — scan projects from the terminal |
CarbonLint calculates carbon emissions using a three-step model:
- Measure energy — The desktop app reads hardware telemetry (CPU load, memory, disk, network) via Rust's
sysinfocrate. The CLI estimates energy from file analysis. - 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.
- Score and report — A Green Score (0–100) summarizes your project's sustainability. Carbon budgets flag regressions.
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
| Component | Built With |
|---|---|
| Desktop App | Tauri 2, Rust, React 19, TypeScript, sysinfo |
| CLI Tool | Node.js 16+, Commander, Chalk, Ora |
| Documentation | Vite, React, Tailwind CSS v4 |
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 . --jsonDownload CarbonLint for Windows, macOS, Linux, or Android from the Downloads page.
Or build from source:
cd tauri-dashboard
npm install
npm run tauri devCarbonLint uses region-specific electricity grid carbon intensity data to calculate emissions accurately. The same data is shared between the desktop app and CLI:
| Region Key | Location | Carbon Intensity (gCO₂/kWh) | Notes |
|---|---|---|---|
EU-NORTH |
Sweden | 25 | Cleanest — mostly hydro and nuclear |
US-WEST |
California | 210 | Solar and wind mix |
EU-WEST |
Ireland | 300 | Wind + gas mix |
US-EAST |
Virginia | 380 | Data center hub, heavier fossil |
ASIA-EAST |
Japan | 470 | Nuclear + fossil |
GLOBAL-AVG |
Global Average | 475 | Default if no region specified |
ASIA-SOUTH |
India | 700 | Coal-heavy grid |
Tip: Set your region in
.carbonlintrc.jsonor with--regionfor accurate results. Running in Sweden vs India can differ by 28x for the same code.
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-AVGcarbon-audit:
image: node:20-slim
stage: test
script:
- npm install -g carbonlint-cli
- carbonlint . --ci --budget 100
allow_failure: falsestage('Carbon Audit') {
steps {
sh 'npm install -g carbonlint-cli'
sh 'carbonlint . --ci --budget 100'
}
}| Shortcut | Action | Scope |
|---|---|---|
Ctrl+Shift+P (⌘+Shift+P on Mac) |
Start / Stop profiling | Global |
Ctrl+Shift+D (⌘+Shift+D on Mac) |
Show / Hide dashboard | Global |
Right-click the system tray icon for additional controls: Start/Stop Profiling, Show/Hide, and Quit.
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
}| Option | Type | Default | Description |
|---|---|---|---|
region |
string | GLOBAL-AVG |
Grid carbon intensity region |
hardwareProfile |
string | laptop |
Hardware type: laptop, desktop, or server |
pue |
number | 1.0 |
Power Usage Effectiveness (data centre overhead factor) |
maxCarbon |
number | 100 |
Carbon budget in grams |
failOnThreshold |
boolean | false |
Exit 1 when budget exceeded (for CI/CD) |
cd tauri-dashboard
npm install
npm run tauri dev # Start dev server with hot reload
npm run tauri build # Build production binariescd carbonlint-cli
npm install
node bin/carbonlint.js . # Run locally without global installcd docs
npm install
npm run dev # http://localhost:5173/carbonlint/
npm run build # Static build for deploymentCarbon 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.
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.
Yes. CarbonLint is 100% free, open-source, and MIT licensed. There are no paid tiers, no telemetry, and no data collection.
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.
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.
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.
| Resource | URL |
|---|---|
| 🌐 Website | nishal21.github.io/carbonlint |
| 📦 npm Package | npmjs.com/package/carbonlint-cli |
| 🐛 Issues | github.com/nishal21/carbonlint/issues |
| 📖 Documentation | CarbonLint Docs |
| 🪞 Mirror | carbonlint.netlify.app |
Contributions are welcome! Please open an issue first to discuss what you'd like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT © Nishal K
Made with 💚 for a greener future.
CarbonLint — sustainable software development, carbon footprint tracker, green coding, eco-friendly developer tools
