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

verdaccio-stats

v0.4.4

Published

The stats plugin for Verdaccio

Readme

Verdaccio Stats Plugin

This plugin adds detailed statistics functionality to your Verdaccio private npm registry.

npm npm npm npm

Features

  • Track package download statistics
  • Track manifest view counts
  • ISO week format support
  • Admin interface to view statistics

Installation

Install Globally

npm install -g verdaccio-stats

Or install to verdaccio plugin folder:

mkdir -p ./install-here/
npm install --global-style \
  --bin-links=false --save=false --package-lock=false \
  --omit=dev --omit=peer --prefix ./install-here/ \
  verdaccio-stats@latest
mv ./install-here/node_modules/verdaccio-stats/ /path/to/verdaccio/plugins/

Note: Do not use --omit=optional flag, as this plugin requires optional dependencies (e.g., platform-specific binaries for rollup) to function correctly at runtime.

Configuration

Add the plugin to your Verdaccio config file:

middlewares:
  stats:
    enabled: true
    dialect: sqlite # Optional: sqlite, mysql, postgres, mariadb, mssql, db2, snowflake, oracle (default: sqlite)
    database: stats.db # For SQLite: path to database file
    # For other databases, use object configuration:
    # database:
    #   name: verdaccio_stats
    #   username: user         # Or use VERDACCIO_STATS_USERNAME env var
    #   password: pass         # Or use VERDACCIO_STATS_PASSWORD env var
    #   host: localhost
    #   port: 5432
    iso-week: false # Optional, whether to use ISO week format
    count-downloads: true # Optional, whether to count downloads
    count-manifest-views: true # Optional, whether to count manifest views
    flush-interval: 5s # Optional: flush interval (number ms or duration string). 0 means realtime flush.
    max-pending-entries: 10000 # Optional: flush when pending entry keys reach this size

Note: SQLite is the default database type, but for performance reason, it is not recommended for production use. For production, consider using MySQL, PostgreSQL, MariaDB, or MSSQL.

You'll also need to ensure that the appropriate database driver is installed. For example, if you're using MySQL, you would need to install mysql2:

npm install -g mysql2

For other databases, install the corresponding driver:

  • PostgreSQL: pg and pg-hstore
  • MariaDB: mariadb
  • MSSQL: tedious
  • SQLite: sqlite3 (not recommended for production)
  • Oracle: oracledb
  • DB2: ibm_db
  • Snowflake: snowflake-sdk

Configuration Options

| Option | Type | Default | Description | | ---------------------- | ---------------- | ----------------- | ------------------------------------------------------------------------------------------------ | | enabled | boolean | true | Whether the plugin is enabled | | dialect | string | sqlite | Database type (sqlite, mysql, postgres, mariadb, mssql, db2, snowflake, oracle) | | dialect-options | object | {} | Additional options to pass to the database driver | | database | string or object | stats.db | Database configuration | | database.name | string | verdaccio_stats | Database name | | database.username | string | | Database username | | database.password | string | | Database password | | database.host | string | localhost | Database host | | database.port | number | 3306 | Database port | | iso-week | boolean | false | Whether to use ISO week format | | count-downloads | boolean | true | Whether to count downloads | | count-manifest-views | boolean | true | Whether to count manifest views | | flush-interval | number or string | 5000 | Flush interval in ms or a duration string (e.g. 5s, 1m); 0 = realtime, <0 disables timer | | max-pending-entries | number | 10000 | Flush when the number of pending entry keys reaches this threshold |

Usage

After installing and configuring the plugin, it will automatically begin collecting the specified statistics. The data will be stored in the configured database file.

You can view the statistics by visiting the following URL:

http://your-registry.com/-/web/stats

License

See the LICENSE file for details.