npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

can-i-publish

v0.0.5

Published

Check if your npm package name is actually publishable. Tests against npm's undocumented similarity filter.

Readme

The Problem

You check if a package name is available on npm. It says yes. You build the whole thing. You run npm publish. Boom:

403 Package name too similar to existing packages degit,pdfkit,exit

npm has an undocumented similarity filter that blocks names even if they don't exist on the registry. npm publish --dry-run doesn't catch it either. Neither does npm-name-cli.

can-i-publish actually tests publishability by checking both the registry AND the similarity filter.

npm-name-cli vs can-i-publish

Try it yourself — check dxkit, a name that looks available but is actually blocked:

# npm-name-cli says it's available (wrong — will fail on npm publish)
$ npx npm-name-cli dxkit
✔ dxkit is available

# can-i-publish catches the similarity block
$ npx can-i-publish dxkit
⚠ dxkit is blocked by npm similarity filter
  Similar to: degit, pdfkit, exit

Other names you can verify: reacto, expresss, loadash, chulk.

| | npm-name-cli | can-i-publish | |---|---|---| | Registry check | Yes | Yes | | Organization check (@org) | Yes | Yes | | Squatter detection | Yes | Yes | | Similarity filter | No | Yes | | Catches dxkit as blocked | No | Yes | | Shows similar packages | No | Yes | | Suggests alternatives | No | Yes (--suggest) |

Install

npx can-i-publish my-package

Or install globally:

npm install -g can-i-publish

Usage

# Check a single name
can-i-publish my-package

# Check multiple names at once
can-i-publish my-tool my-lib my-app

# Check an organization name
can-i-publish @my-org

# Get suggestions if blocked
can-i-publish dxkit --suggest

# JSON output (for scripting)
can-i-publish my-package --json

Output

$ can-i-publish abc123 chalk dxkit my-cool-tool @ava

⚠ abc123 is squatted (https://www.npmjs.com/package/abc123)
✖ chalk is unavailable (https://www.npmjs.com/package/chalk)
⚠ dxkit is blocked by npm similarity filter
  Similar to: degit, pdfkit, exit
✔ my-cool-tool is available
✖ @ava is unavailable (https://www.npmjs.com/org/ava)

How It Works

  1. Validates the name against npm naming rules (lowercase, no spaces, under 214 chars)
  2. Checks the registry to see if the package already exists
  3. Detects squatters — flags packages that exist but appear abandoned (low downloads, no readme, no prod version)
  4. Tests the similarity filter by attempting a publish probe against the npm registry using your npm credentials

[!NOTE] Step 4 requires npm credentials. Run npm login first, or set NPM_TOKEN as an environment variable. If you're not logged in, can-i-publish will still check steps 1-3 and let you know that similarity wasn't tested.

Options

| Flag | Description | |------|-------------| | -s, --suggest | Suggest alternative names if unavailable | | -j, --json | Output results as JSON | | -V, --version | Show version | | -h, --help | Show help |

Exit Codes

  • 0 — all names are available or squatted
  • 1 — one or more names are unavailable, blocked, or invalid

Useful for CI/scripting:

can-i-publish my-package && npm publish

Programmatic API

import { checkName, suggestNames } from 'can-i-publish';

const result = await checkName({ name: 'my-package' });
// { name, status: 'available' | 'taken' | 'squatted' | 'blocked' | 'invalid', reason?, similarTo? }

const suggestions = await suggestNames({ name: 'dxkit', limit: 5 });
// [{ name: 'dxkit-cli', status: 'available' }, ...]

Credits

Inspired by npm-name-cli by Sindre Sorhus.

License

MIT


Built with commandcode by @saqibameen