Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sindresorhus/npm-name-cli
Check whether a package or organization name is available on npm
https://github.com/sindresorhus/npm-name-cli
Last synced: about 1 month ago
JSON representation
Check whether a package or organization name is available on npm
- Host: GitHub
- URL: https://github.com/sindresorhus/npm-name-cli
- Owner: sindresorhus
- License: mit
- Created: 2015-10-19T11:28:51.000Z (about 9 years ago)
- Default Branch: main
- Last Pushed: 2024-02-10T19:41:36.000Z (9 months ago)
- Last Synced: 2024-04-14T00:32:27.475Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 936 KB
- Stars: 281
- Watchers: 6
- Forks: 26
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
- awesome-npm - npm-name - Check whether a package name is available on npm. (Packages / Registry)
- awesome-cli-apps - npm-name-cli - Check whether a package name is available on npm. (Development / Npm)
- awesome-npm - npm-name - Check whether a package name is available on npm. (Packages / Registry)
- fucking-awesome-cli-apps - npm-name-cli - Check whether a package name is available on npm. (Development / Npm)
- jimsghstars - sindresorhus/npm-name-cli - Check whether a package or organization name is available on npm (JavaScript)
README
# npm-name-cli
> Check whether a package or organization name is available on npm
*Feedback about the squatter detection should be opened on the [`squatter`](https://github.com/sholladay/squatter) repo.*
## Install
```sh
npm install --global npm-name-cli
```## Usage
```
$ npm-name --helpUsage
$ npm-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 availableExits with code 0 when all names are available or 2 when any names are taken
```## FAQ
### Why would I use `npm-name` rather than npm's built-in search?
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
```## Related
- [npm-name](https://github.com/sindresorhus/npm-name) - API for this module