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

npm-power-init

v1.0.2

Published

A flexible, customizable, drop-in .npm-init.js for customizing npm init

Readme

npm-power-init

A flexible, customizable, drop-in .npm-init.js for customizing npm init

Download

Download anywhere using npm, git, or http. "cd"to the source files once you have it downlaoded (and unzipped if necessary). There are no dependencies other than node and npm.

Using npm:

npm install npm-power-init -g
cd $NODE_PREFIX/node_modules/npm-power-init

or

npm install npm-power-init
cd node_modules/npm-power-init

You can also clone from Git

git clone [email protected]:jandrieu/npm-power-init.git
cd npm-power-init

Or download a zip from git https://github.com/jandrieu/npm-power-init/archive/master.zip (Right-click and select 'Save link as...')

Unzip and cd into the directory.

Installation

  1. Make npm-power-init.js your npm-init.js script.
  2. Configure ~/.npm-power-init.json
  3. Use npm init as usual

Step 1 -- Make npm-power-init.js your npm-init.js script.

Here are two ways to do this.

A. Rename npm-power-init.js to .npm-init.js and place in your home directory. This is the recommended approach.

cp npm-power-init.js ~/.npm-init.js

B. Set your init module to npm-power-init.js You can set this in any of your .npmrc files https://docs.npmjs.com/files/npmrc or just use npm config. I recommend rist copying npm-power-init.js to your home directory, but you could provide the full path to wherever it is.

cp npm-power-init.js ~/
npm config set init-module ~/npm-power-init.js  

Step 2 -- Configure npm-init.json

npm-power-init.js looks in your home directory for a .npm-init.json file for configuration data.

The config file .npm-init.json is a template package.json with an optional special property npmPowerInitConfig which contains the configuration settings specific to npm power init. Look in the examples directory to see how it works.

Available settings

exec -- An array of templated commands to run with process.exec

  "exec" : ["mkdir test && touch test/${dir}Test.js"]

editor -- The path to an editor for opening the resulting package.json after npm init completes.

  "editor" : "/usr/bin/emacs"

bypass -- Boolean (defaults to false) to skip the interactive part of npm init.

  "bypass" : true

Template variables

Before parsing the .npm-power-init.json, we replace two special tags, ${dir} and ${path}, with their respective values.

${dir} -- The name of the current working directory

${path} -- The full path to the current working directory

${dir} is great for naming files or your package based on the directory in which you run npm init. ${path} is useful if you want to make sure you have the full absolute path for any file manipulation.

Step 3 -- Use npm init as usual

To create a new project "newProject":

mkdir newProject
cd newProject
npm init

Your newProject's package.json will be created using the npm-power-init features configured in your .npm-power-init.json.