# sindresorhus/np

A better `npm publish`

Repository: https://github.com/sindresorhus/np
Canonical: https://ross.abutalabs.com/products/np
Language: JavaScript
License: MIT
License Family: permissive
Topics: npm, npm-package, publish, javascript, nodejs, npm-publish, yarn, cli, cli-app
Last push: 2026-07-30T22:35:40+00:00

## Health v2 (maintenance only)
Score: 96/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 95, release rhythm 95, longevity 100
- inputs: {"age_days": 4035, "days_push": 34, "days_rel": 34, "gap_med": 13.0, "n_releases_24m": 13}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 7712, forks 310 (observed 2026-08-28T04:10:02.540199+00:00)

## What it is
np is an interactive CLI tool that improves the npm publish workflow for JavaScript packages. It automates safety checks, version bumping, git tagging, publishing, and pushing commits and tags to GitHub or GitLab.

## Use cases
- publish an npm package safely from the command line
- bump package version and create a git tag in one step
- run tests and checks before publishing a release
- avoid accidentally publishing pre-release versions under the latest tag
- push commits and tags to GitHub after a release
- open a prefilled GitHub release draft after publishing

## When to choose
- you publish npm packages locally and want an interactive, safety-checked release flow
- you want version bumping, tagging, publishing, and pushing automated in one command
- you need 2FA support and rollback on failed publishes

## When to avoid
- you need to publish from a monorepo - monorepos are not supported
- you want to publish in CI pipelines - np is designed for interactive local use
- your project requires Node.js older than 22 or npm older than 10

## Facets
- artifact type: cli-tool
- maturity: active
- function: cli, developer-tools, version-control, ci-cd
- domain: developer-tools, version-control
- platform: cli, cross-platform
- tags: npm-publish, release-automation, version-bumping, git-tags, package-publishing, command-line, automation, nodejs

## Member repositories
- sindresorhus/np (main) score 96

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:02.540199+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:35:26.373656+00:00, confidence not recorded.
  - readme: https://github.com/sindresorhus/np (fetched 2026-08-28T04:10:02.540199+00:00, sha 88180a4a1c37)
  - registry_npm: https://registry.npmjs.org/np (fetched 2026-08-29T08:31:42.447221+00:00, sha 1f06d3168615)
- Data as of 2026-08-30T08:39:29.467469+00:00.
