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 🙏

© 2025 – Pkg Stats / Ryan Hefner

npm-recursive-runner

v1.0.2

Published

Run npm commands recursively across multiple package.json directories with parallel execution support

Readme

npm-recursive-runner

A powerful utility to recursively run npm commands in any child directory that has a package.json file. Formerly known as npm-recursive-install, this enhanced version allows you to run any command (not just npm install), with support for parallel execution.

Features

  • Run any npm command recursively across all package.json directories
  • Skip node_modules and other specified directories
  • Parallel execution with configurable concurrency
  • Production mode support for install commands
  • Customizable directory filtering

Installation

npm install npm-recursive-runner --save-dev

Options

  • --command <command>: Specify the command to run in each directory (default: npm install)
  • --production: When using install commands, add the --production flag to skip dev dependencies
  • --parallel: Run commands in parallel for faster execution
  • --concurrency <number>: Set the maximum number of concurrent processes (default: 4)
  • --rootDir <directory>: Specify the root directory to start searching for package.json files
  • --skipRoot: Skip execution for the root package.json
  • --skip <directories>: Skip execution for specific directories
  • --includeDirectories <directories>: Add specific directories for command execution

Usage Examples

Basic Usage

Run npm install in all package.json directories:

$ npm-recursive-runner

Run Custom Commands

Run npm ci instead of npm install:

$ npm-recursive-runner --command="npm ci"

Run a build script in all packages:

$ npm-recursive-runner --command="npm run build"

Clean node_modules directories:

$ npm-recursive-runner --command="rm -rf node_modules"

Parallel Execution

Run installations in parallel (4 concurrent processes by default):

$ npm-recursive-runner --parallel

Run with custom concurrency level:

$ npm-recursive-runner --parallel --concurrency=8

Filtering Directories

Skip specific directories:

$ npm-recursive-runner --skip dist build

Start from a specific directory:

$ npm-recursive-runner --rootDir=packages

Skip root directory but process all others:

$ npm-recursive-runner --skipRoot

Include specific directories:

$ npm-recursive-runner --skip dist --includeDirectories dist/special-package

Production Mode

Install dependencies without dev dependencies:

$ npm-recursive-runner --production

Combining Options

Run a clean script in parallel across all packages except test packages:

$ npm-recursive-runner --command="npm run clean" --parallel --skip test-*

Origin & Contributors

This package is an enhanced version of npm-recursive-install originally created by Matt Green, extended with support for custom commands and parallel execution.

Contributors

  • [Avi Weiss] - Added custom command support and parallel execution
  • Matt Green - Creator of the original npm-recursive-install

License

MIT