# np

> A better npm publish: checks, tests, version bump, tag and publish in one step

Source: https://talira.ai/catalog/np-xzn2cvrv
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool
- Categories: [devops / release management](https://talira.ai/categories/devops/release-management), [languages / javascript](https://talira.ai/categories/languages/javascript)
- Licence: MIT[^2]
- Pricing: Free and open source[^2]
- Pricing notes: Free and open source (MIT).
- Free tier: yes[^2]
- Backed by: [Sindre Sorhus](https://talira.ai/orgs/sindresorhus.md)

np is Sindre Sorhus's command-line tool for publishing an npm package safely. Run interactively, it checks you're on the release branch with a clean, up-to-date working tree, reinstalls dependencies, checks Node.js and npm versions, runs the tests, bumps the version in package.json and the lockfile, creates a git tag, publishes (optionally under a dist-tag), pushes commits and tags to GitHub or GitLab, and opens a prefilled GitHub release draft. It rolls the project back if publishing fails, supports two-factor authentication and has a dry-run mode. It works with npm 10+, pnpm, Bun and Yarn.

## Links

- GitHub: https://github.com/sindresorhus/np

## Problems it solves

- publish a new version of my npm package without forgetting to run the tests or push the tag
- bump the version, tag it and publish to npm in one command
- roll back automatically if npm publish fails

## Features

- interactive publishing UI
- checks branch, clean working tree and unpulled changes
- runs tests and reinstalls dependencies first
- bumps the version and creates a git tag
- rolls back if publishing fails
- dry-run mode
- prefilled GitHub release draft
- npm, pnpm, Bun and Yarn

## Limitations

- It doesn't support monorepos.[^1]
- It's meant to be run locally and interactively, not in CI.[^1]

## Trust

Overall: 0.57 out of 1.
Signals: maintenance 0.68, adoption 0.78, momentum 0.53, community 0.80, backing 0.30, extensibility 0.00.

- last commit 37 days ago
- 34 commits in the last 90 days
- latest release v12.1.1 2 months ago
- 7.7k GitHub stars
- 98 contributors
- accepts sponsorship (Github, Open Collective, Buy Me A Coffee)
- backed by Sindre Sorhus

## Related

- Works with [npm](https://talira.ai/catalog/npm-pecwd9vr.md)

## Alternatives

- [semantic-release](https://talira.ai/catalog/semantic-release-hervdzv2.md): Fully automated version management and package publishing
- [Release It!](https://talira.ai/catalog/release-it-kpc57r2n.md): A generic CLI to automate versioning and package publishing
- [bump](https://talira.ai/catalog/bump-7atgf8a8.md): Bump a Ruby gem's version number, commit it and tag it
- [commit-and-tag-version](https://talira.ai/catalog/commit-and-tag-version-48qcm4jy.md): Bump versions, write the CHANGELOG and tag releases from Conventional Commits
- [gem-release](https://talira.ai/catalog/gem-release-ww6b7709.md): Release Ruby gems with bump, tag and release commands
- [Changesets](https://talira.ai/catalog/changesets-dgxgsz7w.md): A tool to manage versioning and changelogs with a focus on monorepos

## Sources

[^1]: https://github.com/sindresorhus/np/blob/main/readme.md (checked 29 Nov 2026)
[^2]: https://github.com/sindresorhus/np/blob/main/license (checked 29 Nov 2026)
