An Essay on Package Naming: Names That Survive Contact With Users

A package name gets typed into terminals, pasted into lockfiles, spoken aloud in code review and searched for years after you choose it. It is the one piece of your package that you effectively cannot change. That alone justifies spending more than five minutes on it.

Every registry has its own idea of "the same name"

Before style, there are rules, and they differ quietly between ecosystems. Knowing them prevents the unpleasant surprise of a name that is taken in a form you did not expect.

EcosystemWhat to know
npmNew names must be lowercase and URL-safe. Scoped names such as @org/name live in a namespace you control.
PyPINames are normalised: case is ignored and runs of hyphens, underscores and dots are treated as one separator, so My_Lib and my-lib collide.
crates.ioHyphens and underscores are treated as equivalent when checking whether a name is taken.
Go modulesThe name is the module path, usually a repository URL, and major versions from v2 onwards add a /v2-style suffix.

The practical lesson: check availability in every normalised spelling, and if you publish to more than one registry, pick a name that survives all of their rules unchanged.

Descriptive beats clever, mostly

There is a long-running tension between names that describe (csv-parse) and names that brand (a made-up word). Descriptive names are easier to discover and to remember six months later. Brand names age better if the package's scope grows, and they avoid the awkwardness of a "csv" library that now also reads spreadsheets.

A reasonable rule: libraries that do one well-bounded thing should be named for that thing; frameworks and tools that will grow should get a short, pronounceable brand. Avoid names that only make sense with an in-joke, because the joke rarely outlives the first contributor.

Scopes and prefixes are naming too

For organisations, a scope or prefix often matters more than the individual name. Publishing everything under @yourorg/ on npm, or a consistent yourorg- prefix on PyPI, makes ownership obvious and makes impersonation harder. It also lets internal teams adopt a convention like @yourorg/plugin-* that tells readers what kind of package they are looking at before they open it.

Plugin ecosystems frequently have their own established patterns, such as a host tool expecting a particular prefix to discover plugins. Follow those patterns even if you dislike them; the convention is part of how users find you.

Names to avoid

Claim, then publish

Once decided, reserve the name in every registry you might plausibly target, even with a placeholder release that clearly says so. Then write the name down in the README exactly as users should type it in an install command. Consistency between the repository name, the import name and the install name is a small kindness that saves a surprising number of support questions.