Package Metadata That Helps People Find (and Trust) Your Package

Code quality does not show up in a search result. What shows up is a one-line description, a handful of links and whatever the registry can infer from your manifest. Those fields take ten minutes to fill in and are the first thing a stranger uses to decide whether to click. Here is what to set in each major ecosystem and what to avoid.

The fields that matter, by ecosystem

Purposenpm (package.json)Python (pyproject.toml)Rust (Cargo.toml)
One-line summarydescriptiondescriptiondescription
Search termskeywordskeywordskeywords (crates.io allows a small number)
Categorisationnone built inTrove classifierscategories from a fixed list
Source linkrepository[project.urls]repository
Docs or sitehomepage[project.urls]documentation, homepage
Where to report bugsbugs[project.urls]usually via repository

Go is the odd one out: there is no metadata file beyond go.mod. pkg.go.dev builds its page from your README, your doc comments and the licence file it detects, so those three do the job the other ecosystems give to manifest fields.

Writing the description

A good description says what the package does, for whom, in under about a dozen words. Compare:

Avoid putting version numbers, badges or emoji in it; some registries truncate the field and others index it for search, so plain words help on both counts.

A filled-in example (illustrative)

[project]
name = "duration-parse"
description = "Parse and validate ISO 8601 durations, no dependencies"
readme = "README.md"
license = "MIT"
keywords = ["iso8601", "duration", "time", "parser"]
classifiers = [
  "Programming Language :: Python :: 3",
  "Typing :: Typed",
  "Development Status :: 4 - Beta",
]

[project.urls]
Source = "https://example.com/you/duration-parse"
Issues = "https://example.com/you/duration-parse/issues"
Changelog = "https://example.com/you/duration-parse/blob/main/CHANGELOG.md"

The JavaScript equivalent is shorter because npm has fewer structured fields:

{
  "name": "duration-parse",
  "description": "Parse and validate ISO 8601 durations, no dependencies",
  "keywords": ["iso8601", "duration", "parser"],
  "repository": { "type": "git", "url": "git+https://example.com/you/duration-parse.git" },
  "bugs": "https://example.com/you/duration-parse/issues",
  "license": "MIT"
}

Metadata as a trust signal

Beyond search, these fields are how a cautious reader checks that the package is what it claims to be. A repository link that resolves to real source, a licence that matches the file in the repository, and a changelog URL that leads somewhere all suggest a maintained project. Missing or mismatched fields are a mild warning sign, and they are exactly what typosquatted copies tend to get wrong. On registries that show provenance, the repository field is also compared against the attested source, so keep it accurate.

Quick checks before you publish

  1. Open each URL in the manifest and confirm it does not 404.
  2. Make sure the keywords are words a user would type, not internal project names.
  3. For Python, confirm classifiers are on the official Trove list; PyPI rejects unknown ones on upload.
  4. Render the README locally the way the registry will, since it becomes your package's landing page.

For the licence field specifically, see declaring an SPDX identifier; for choosing the name itself, the naming essay.

Related pages