secure-npm-package-name
v0.0.1
Published
CLI to secure npm package name
Readme
reserve.js – Reserve an npm Package Name
This repository contains a tiny CLI tool to help you reserve an npm package name by publishing a minimal placeholder package stored in the packages/ directory.
Usage
node reserve.js <your-desired-package-name>This command updates:
packages/package.json– sets"name"to your desired package name.packages/README.md– replaces the title and all occurrences of the old package name.
Workflow
Set the package name
node reserve.js my-cool-packageLogin to npm
npm loginPublish the placeholder
npm publish ./packages --access public
This publishes version 0.0.1 of a placeholder package, thereby securing the name.
Notes
The CLI uses only built-in Node.js modules (no dependencies).
If you make a mistake, you can unpublish within 72 hours:
npm unpublish --force
The files that actually get published live in the packages/ folder. Everything else can be committed (or ignored) as you prefer.
