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

carbonlint-cli

v1.0.0

Published

CLI tool for measuring and tracking the carbon footprint of your software projects. Supports CI/CD integration with carbon budgets.

Readme

carbonlint-cli

Measure and track the carbon footprint of your software projects from the command line.

npm MIT License

CarbonLint CLI estimates the CO₂ emissions of your codebase by analyzing file types, sizes, and regional carbon intensity data. Use it locally or in CI/CD pipelines to set carbon budgets and catch regressions.

Install

npm install -g carbonlint-cli

Quick Start

# Initialize config in your project
carbonlint init

# Scan your project
carbonlint .

# Override region for a specific scan
carbonlint . --region EU-NORTH

# JSON output for CI pipelines
carbonlint . --json

# Fail the build if over budget (CI gate)
carbonlint . --ci --budget 50

Commands

| Command | Description | |---------|-------------| | carbonlint init | Create .carbonlintrc.json with default settings | | carbonlint [path] | Scan project and generate carbon report |

Options

| Flag | Description | Default | |------|-------------|---------| | -r, --region <region> | Carbon intensity region | GLOBAL-AVG | | -b, --budget <grams> | Carbon budget threshold in grams | 100 | | --profile <profile> | Hardware profile (laptop/desktop/server) | laptop | | --json | Output structured JSON | — | | --ci | Exit code 1 if over budget | — |

Regions

| Key | Location | gCO₂/kWh | |-----|----------|-----------| | EU-NORTH | Sweden | 25 | | US-WEST | California | 210 | | EU-WEST | Ireland | 300 | | US-EAST | Virginia | 380 | | ASIA-EAST | Japan | 470 | | GLOBAL-AVG | Global Average | 475 | | ASIA-SOUTH | India | 700 |

CI/CD Integration

GitHub Actions

- name: Carbon Check
  run: |
    npm install -g carbonlint-cli
    carbonlint . --ci --budget 50 --region US-WEST

GitLab CI

carbon-check:
  script:
    - npm install -g carbonlint-cli
    - carbonlint . --ci --budget 50

Configuration

Create .carbonlintrc.json with carbonlint init:

{
  "region": "GLOBAL-AVG",
  "hardwareProfile": "laptop",
  "pue": 1.0,
  "maxCarbon": 100,
  "failOnThreshold": false
}

Programmatic API

import { scanProject, loadConfig } from 'carbonlint-cli';

const config = loadConfig('.');
const result = scanProject('.', config);
console.log(result.greenScore);  // 0-100
console.log(result.carbon_grams);

License

MIT © Nishal K