{"repo":"sindresorhus/np","free":true,"listed":false,"github":"https://github.com/sindresorhus/np","clone":"git clone https://github.com/sindresorhus/np.git","description":"A better `npm publish`","language":"JavaScript","stars":7712,"topics":["npm","npm-package","publish","javascript","nodejs","npm-publish","yarn","cli","cli-app"],"license":"MIT","category":"cli-tools","readme_excerpt":"np A better npm publish Why - Interactive UI - Ensures you are publishing from your release branch ( main and master by default) - Ensures the working directory is clean and that there are no unpulled changes - Reinstalls dependencies to ensure your project works with the latest dependency tree - Ensures your Node.js and npm versions are supported by the project and its dependencies - Runs the tests - Bumps the version in package.json and package-lock.json (if present) and creates a git tag - Prevents accidental publishing of pre-release versions under the latest dist-tag - Publishes the new version to npm, optionally under a dist-tag - Rolls back the project to its previous state in case publishing fails - Pushes commits and tags (newly & previously created) to GitHub/GitLab - Supports two-factor authentication - Enables two-factor authentication on new repositories (does not apply to external registries) - Opens a prefilled GitHub Releases draft after publish - Warns about the possibility of extraneous files being published - See exactly what will be executed with dry-run mode, without pushing or publishing anything remotely - Supports GitHub Packages - Supports npm 10+, pnpm 11+, Bun, and Yarn (Classic and Berry) Why not - Monorepos are not supported. - CI is not an ideal environment for np . It's meant to be used locally as an interactive tool. Prerequisite - Node.js 22 or later - npm 10 or later - Git 2.11 or later Install Usage Interactive UI Run np without arguments to","default_branch":null,"files":null,"tree":[],"storefront":"/r/sindresorhus","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/sindresorhus/np/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}