Skip to content

kszongic/npm-name-check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm-name-check

Instantly check if npm package names are available — with bulk check and smart suggestions.

npm version npm downloads zero dependencies node license

Why?

Coming up with a good npm package name is hard. Names get taken fast, and checking one at a time on npmjs.com is painfully slow.

npm-name-check lets you check dozens of names in seconds, right from your terminal — and suggests alternatives when your first choice is taken.

Install

npm install -g npm-name-check

Or use it instantly without installing:

npx npm-name-check my-awesome-lib

Usage

# Check a single name
npm-name-check my-awesome-lib
# ✅ my-awesome-lib is available!

# Check multiple names at once
npm-name-check react vue svelte solid
# ❌ react — taken
# ❌ vue — taken
# ❌ svelte — taken
# ❌ solid — taken

# Get suggestions for taken names
npm-name-check react --suggest
# ❌ react — taken
# 💡 Suggestions:
#   ✅ react-toolkit
#   ✅ my-react
#   ✅ react-plus

Features

  • Fast — parallel checks against the npm registry
  • 📦 Bulk check — check multiple names in one command
  • 💡 Smart suggestions — suggests available alternatives with common prefixes/suffixes
  • 🎨 Color output — green for available, red for taken
  • 🪶 Zero dependencies — just Node.js built-ins

Real-World Use Cases

1. Brainstorming a package name

npm-name-check utils helper toolkit toolbox kit

Check a batch of candidates in one shot instead of searching npmjs.com five times.

2. Pre-publish validation in CI

# In your CI pipeline — fail if name is already taken
npm-name-check $(node -p "require('./package.json').name") || exit 1

3. Finding a namespace for your org

npm-name-check acme-utils acme-cli acme-core acme-sdk --suggest

4. Name research for a new project

npm-name-check create-my-app my-app-cli my-app-core --suggest

Get suggestions for taken names automatically.

API

You can also use it programmatically:

const { checkName } = require('npm-name-check');

const result = await checkName('my-package');
// { name: 'my-package', available: true }

Comparison

Tool Bulk Check Suggestions Zero Deps CLI Programmatic
npm-name-check
npm-name (sindresorhus)
npm-name-cli
npmjs.com search

Package Naming Tips

  1. Keep it shortdep-size beats dependency-size-checker-tool
  2. Use hyphensmy-tool not myTool or my_tool
  3. Be descriptive — the name should hint at what it does
  4. Avoid generic terms aloneutils is taken; acme-utils might not be
  5. Check early — run npm-name-check before writing a single line of code

Related Tools

License

MIT © kszongic

Support

If this saved you time, consider sponsoring 💛

About

Instantly check if npm package names are available. Bulk check + smart suggestions. Zero deps.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors