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

narn

v3.0.0

Published

Never have to switch between yarn, npm, and pnpm commands ever again.

Readme

narn

Never have to switch between yarn, npm, and pnpm commands ever again.

narn is a CLI that detects whether your current npm package is using npm, yarn, or pnpm. It then spawns the correct one with the correct arguments. The arguments to narn itself are exactly the same as if you're using yarn. The command will be converted to npm or pnpm's syntax if the current package is managed by npm / pnpm.

Installation

npm i -g narn

yarn global add narn

pnpm i -g narn

Extras

If you run narn upgrade-interactive on a project managed by npm, you'll need to globally install ncu.

If you run narn publish on a project managed by npm, you'll need to globally install np.

Usage

# To install from package.json
narn # or narn install

# To add new package
narn add react

# To remove a package
narn remove react

# Add a dev dependency
narn add --dev webpack
narn add -D webpack

# Run a script from the package.json
narn test
narn build

# Publish with interactive UI
narn publish

# Upgrade dependencies with interactive ui
narn upgrade-interactive
narn upgrade-interactive --latest

# Install global library. All global libs are installed with yarn (since the most important thing is just that you consistently use the same package manager for global libs)
narn global add @vue/cli

# yarn create single-spa is similar to npm init single-spa
narn create single-spa

# View the installed versions of narn and yarn/npm
narn -v
narn --version

# global commands are supported too
narnx global add http-server
narnx global remove http-server

# Run npx / pnpx
narnx create-single-spa

For more usage, see the Yarn CLI docs - narn's cli is meant to behave exactly the same.

Default Package Manager

To set the default package manager that's used in projects that don't have a yarn.lock, pnpm-lock.yaml, or package-lock.json, set the NARN_DEFAULT_PM environment variable. You can also add this to your bashrc (or equivalent) to ensure the variable is always there.

export NARN_DEFAULT_PM=pnpm
narn

Publish behavior

By default, narn uses np on npm and pnpm projects. However, np doesn't support pnpm. Because of that, it might be desireable to turn off np as the handler for npm publish. To disable np, set the following environment variable:

export NARN_PUBLISH=passthrough
narn publish