explaingit

sindresorhus/np

Analysis updated 2026-06-22 · repo last pushed 2026-05-12

7,698JavaScriptAudience · developerComplexity · 2/5MaintainedSetup · easy

TLDR

Command-line tool that automates publishing npm packages, runs tests, bumps version, creates a git tag, and publishes to npm so you don't have to run a dozen commands manually each release.

Mindmap

mindmap
  root((np))
    What it does
      Automates npm release
      Bumps version number
      Creates git tag
      Rolls back on failure
    Supported tools
      npm
      Yarn pnpm Bun
    Use cases
      Single package publish
      Dry run preview
    Audience
      JS package maintainers
      Open source devs
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Publish a new patch, minor, or major version of your npm package with a single command instead of running steps manually.

USE CASE 2

Safely release a package with automatic rollback if publishing fails partway through.

USE CASE 3

Preview the entire release process without actually pushing or publishing using the dry-run flag.

What is it built with?

JavaScriptNode.jsnpmYarnpnpmBun

How does it compare?

sindresorhus/npapoorvsaxena/lozad.jsecomfe/echarts-for-weixin
Stars7,6987,4987,498
LanguageJavaScriptJavaScriptJavaScript
Last pushed2026-05-12
MaintenanceMaintained
Setup difficultyeasyeasymoderate
Complexity2/51/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Copy-paste prompts

Prompt 1
I use np to publish npm packages and my release is failing partway through. Here is the error: [paste error]. How do I debug and fix it?
Prompt 2
Show me how to set up np in my JavaScript project so I can publish with `np patch` instead of running npm commands by hand.
Prompt 3
How do I use np's --dry-run flag to preview exactly what will happen without actually publishing to npm?
Prompt 4
Help me configure np to prevent accidentally publishing a pre-release version as the latest tag.
Prompt 5
My project uses pnpm. How do I tell np to use pnpm instead of npm when running installs before publishing?

Frequently asked questions

What is np?

Command-line tool that automates publishing npm packages, runs tests, bumps version, creates a git tag, and publishes to npm so you don't have to run a dozen commands manually each release.

What language is np written in?

Mainly JavaScript. The stack also includes JavaScript, Node.js, npm.

Is np actively maintained?

Maintained — commit in last 6 months (last push 2026-05-12).

How hard is np to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is np for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.