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

@earlyai/cli

v2.16.4

Published

early cli

Readme

@earlyai/cli

AI-powered CLI tool that generates unit tests for TypeScript/JavaScript codebases.

Commands

gather-stats

Gathers adoption statistics for EarlyAI-generated test files in merged PRs. Analyzes which .early.test.* files were added, modified, or deleted, and reports adoption metrics to the EarlyAI backend.

Alias: stats

early gather-stats [options]

Options

| Option | Env Var | Default | Description | |---|---|---|---| | --api-key <key> | API_KEY | — | EarlyAI API key (required) | | --token <token> | TOKEN | — | GitHub/Bitbucket token (required) | | --git-org <org> | GIT_ORG | auto-detected | Git organization name | | --git-repo <repo> | GIT_REPO | auto-detected | Git repository name | | --scm-provider <provider> | SCM_PROVIDER | github | SCM provider (github or bitbucket) | | --ref-name <ref> | REF_NAME | — | Head branch name (required) | | --backfill [value] | BACKFILL | false | Ignore last run timestamp and reprocess recent PRs | | --max-prs <number> | MAX_PRS | 5 | Maximum PRs to process on first run or backfill | | --pr-number <number> | PR_NUMBER | — | Process a single PR by number | | --summary-only [value] | SUMMARY_ONLY | true | Report only the adoption summary per PR. When false, also includes per-file details (file paths, change types) and per-commit breakdowns |

How it works

Incremental by default. On each run, gather-stats records a timestamp. The next run only processes PRs merged after that timestamp — no cap on how many.

First run. When no previous run exists, there is no timestamp to start from. Instead, it processes the most recent merged PRs up to --max-prs (default: 5).

Backfill mode (--backfill). Resets the "since" timestamp and reprocesses the most recent merged PRs up to --max-prs. Use this to reprocess PRs that were missed or to refresh data after a bug fix.

Single PR mode (--pr-number). Fetches and processes only the specified PR. Bypasses the timestamp check, --backfill, and --max-prs. Use this to refresh data for a specific PR.

What gets reported. A merged or closed PR is included in the report if:

  1. Its diff contains .early.test.* files (added, modified, or deleted), OR
  2. Any of its commits contain .early.test.* files, OR
  3. It has an EarlyAI workflow run (Early ran on it, even if no test files were committed)

Open PRs and PRs with no EarlyAI involvement are skipped.

PR state tracking. Each reported PR includes its state (MERGED or CLOSED). This is sent as prState in the adoption entry, allowing the backend to store it in pr_change_type for the SUMMARY record. The UI can use this to distinguish between merged PRs (green dot) and closed-without-merge PRs.

Summary-only mode (--summary-only, default: true). By default, only the adoption summary is reported for each PR (how many tests were added, modified, deleted, or unchanged). This creates a single SUMMARY record per PR on the backend. Set --summary-only false to also include per-file details (file paths, change types) and per-commit breakdowns — useful for debugging or detailed auditing.

Examples

# Normal incremental run
early gather-stats --api-key $KEY --token $TOKEN --ref-name master

# First run or backfill with more PRs
early gather-stats --api-key $KEY --token $TOKEN --ref-name master --backfill --max-prs 50

# Refresh data for a specific PR
early gather-stats --api-key $KEY --token $TOKEN --ref-name master --pr-number 1419