Everything you need to measure, lint, and reduce the carbon footprint of your software.
Install Carbonah with a single command. Binaries are available for macOS, Linux, and Windows.
Pre-built binaries for all platforms are available on the Releases page.
Three steps to your first carbon measurement:
CARBONAH.md scorecard in your project root after linting. Commit it to track your carbon grade over time.
The measure command wraps any executable and calculates its carbon intensity using the ISO/IEC 21031:2024 SCI formula.
carbonah measure [options] -- <your-command>-- separates carbonah flags from the command being measured.
| Flag | Description | Default |
|---|---|---|
--region <code> | ISO country or cloud region (e.g. ZA, aws-us-east-1) | Auto-detect |
--format <fmt> | Output format: text, json | text |
--fail-on <n> | Exit 1 if SCI exceeds n gCO2eq/run | — |
--warn-on <n> | Print warning if SCI exceeds n | — |
Scan source code for carbon-inefficient patterns across 12 languages.
| Flag | Description | Default |
|---|---|---|
--format <fmt> | text, json, sarif, markdown | text |
--fail-on <rule> | Exit 1 if rule is triggered | — |
--config <path> | Path to .carbonah.toml | Auto-detect |
Python, JavaScript, TypeScript, PHP, Ruby, Go, Rust, C, C++, C#, Java, Delphi/Pascal
See the full Rules Reference for all lint rule codes and examples.
Scan dependency manifests for oversized, duplicate, or unnecessary packages.
requirements.txt, pyproject.toml, Pipfile, composer.json, package.json, Cargo.toml, go.mod, Gemfile, .dproj
Track your development machine's carbon emissions over time with a background daemon.
The daemon samples CPU usage every 30 seconds with near-zero overhead. The final report includes energy breakdown, carbon totals, and extrapolations (per hour, per day, per year, per team).
Create a .carbonah.toml in your project root to set defaults:
Suppress specific rules on a per-line basis with a comment:
The comment must appear on the line immediately before the flagged code. Supports all rule codes.