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

create-library-cli

v1.5.0

Published

The interactive CLI will help you create and configure your library project automatically.

Readme

create-library-cli

GitHub license Tests npm


The interactive CLI will help you create and configure your library project automatically. This allows you to easily develop, collaborate on and publish a JavaScript library with all the modern tooling you'd expect from the current JavaScript ecosystem.

Why should you use this? One of the hidden challenges of authoring opensource JavaScript libraries is to provide a project that is easy to contribute to. You want people to join your project. Doing so requires a good amount of boilerplate: testing, code coverage, dependencies maintenance, release scripts, tooling requirements (Node.js, Yarn and which versions are we using again?), code editor configuration, formatting, linting... Well, this is the goal of this template: to provide sensible and modern defaults to all those subjects. So that once set up, you can focus on ⌨️ coding, 🙌 collaborating and 🚀 shipping.

The goals of the CLI are to:

  • Ease the contribution of the library by providing reproducible environments for developers and CI
  • Automate as much as possible, from testing to releasing and upgrading dependencies

Features:

  • EditorConfig: easy contributions from any code editor.
  • ESLint: launched in the npm lint script.
  • Prettier: launched in the npm lint script, with markdown, JavaScript, CSS and JSON files support (including automatic package.json formatting).
  • Node.js version pinning: via nvm, so anyone contributing or any system accessing your library will use the same Node.js version without having to think about it.
  • Jest: launched in the npm test script.
  • GitHub actions: automatic testing and releasing from GitHub: npm publish and GitHub releases are automatically created. Note that the package.json in your repository is never updated (the version is always 0.0.0-development), only the one in npm is updated. This is surprising at first but as long as you display the published version in your README (like this template does) then you're fine. Find more information about this in the semantic-release documentation.
  • semantic-release: allows for automatic releases based on semver.org and conventional commits specification. The defaults are taken from the Angular git commit guidelines.
  • Codecov: launched in the npm test script on CI, ensures code coverage does not decrease on pull requests (free for public and private repositories).
  • Renovate configured with the JavaScript library preset: this will automatically update your dependencies by opening pull request for you to approve or not. So you never have to think about it (free for public and private repositories).

Usage

Using this CLI requires a bit of setup, but way less than if you had to start from 0. Here's what you need to do:

Required steps: (needed every time you want to use the CLI)

  • Create a new empty repository on GitHub
  • Setup renovate for your new repository. If you previously installed the Renovate application to your account then this is just a box to tick when creating the repository
  • Setup Codecov for your new repository. If you previously installed the Codecov application to your account then this is just a box to tick when creating the repository
  • Add the previously generated GH_TOKEN and NPM_TOKEN secrets to the GitHub secrets of the new repository
  • Initiate project npx create-library-cli
  • Setup semantic releases: run npx semantic-release-cli setup in a terminal (This will ask for your npm and GitHub credentials)
  • Install dependencies: run npm i in your terminal
  • Develop your library: change code in src/
  • Test your library: run npm jest
  • Check formatting of your code: run npm lint in your terminal
  • Fix formatting of your code: run npm format in your terminal
  • Create your first release: open a pull request on your project, wait for tests to pass, merge and 💥 your library will be automatically released to npm and a GitHub release will be created

Optional steps: (needed only if you're doing them for the first time)

  1. Make sure you have npm 2fa auth-only configured. Releases can't be automated if you have 2fa setup for both authentication and publish. See https://semantic-release.gitbook.io/semantic-release/usage/ci-configuration#authentication-for-plugins