npm-name-cli
Version:
Check whether a package or organization name is available on npm
80 lines (52 loc) • 1.72 kB
Markdown
or organization name is available on npm
<img src="screenshot.gif" width="300">
*Feedback about the squatter detection should be opened on the [`squatter`](https://github.com/sholladay/squatter) repo.*
```sh
npm install --global npm-name-cli
```
```
$ npm-name --help
Usage
$ npm-name <name> …
Examples
$ npm-name chalk
✖ chalk is unavailable
$ npm-name abc123
⚠ abc123 is squatted
$ npm-name hello --similar
⚠ hello is squatted
Similar names:
✔ hullo is available
✔ how-do-you-do is available
$ npm-name unicorn-cake
✔ unicorn-cake is available
$ npm-name @ava
✖ @ava is unavailable
$ npm-name @abc123
✔ @abc123 is available
$ npm-name @sindresorhus/is unicorn-cake
✖ @sindresorhus/is is unavailable
✔ unicorn-cake is available
Exits with code 0 when all names are available or squatted, or code 2 when any names are taken or have errors
```
1. Nicer & simpler output
2. [Squatter detection](https://github.com/sholladay/squatter)
3. Supports checking the availability of organization names
4. Suggest other similar names if not available
5. Performance
Using npm 4.0.2
```
$ time npm search unicorn-cake
No matches found for "unicorn-cake"
npm search unicorn-cake 55.50s user 0.82s system 101% cpu 55.380 total
$ time npm-name unicorn-cake
✔ unicorn-cake is available
npm-name unicorn-cake 0.17s user 0.02s system 35% cpu 0.535 total
```
- [npm-name](https://github.com/sindresorhus/npm-name) - API for this package
> Check whether a package