NPM-SEARCH(1)
π NPM-SEARCH(1) β the manual page, bestie edition β¨
okay so you opened the manual page for NPM-SEARCH(1) and I'm gonna walk you through it like we're texting at 2am π«Ά this is the one about searching the registry for packages. buckle up.
π NAME π
npm-search β literally just Search for packages π that's the whole vibe.
β¨ Synopsis β¨
npm search <search term> [<search term> ...]
aliases: find, s, se
so you can call it npm search, or you can be quirky and use find, s, or se β all four, same thing, no cap π
β οΈ Note: This command is unaware of workspaces. like, it simply does not know they exist. it's giving main character energy that refuses to acknowledge the group chat π
πΈ DESCRIPTION πΈ
so npm search goes and searches the registry for packages that match your search terms. it does a linear, incremental, lexically-ordered search through package metadata for all files in the registry π₯ yes that's the exact wording, don't come for me, it's giving "we read the docs and we're repeating them faithfully."
if your terminal has color support, it'll highlight the matches in the results for you β so cute of it π
you can turn that off with the config item color if the rainbow is too much for you (it's never too much for me).
also!! you can use --searchopts and --searchexclude paired with more search terms to include and exclude further patterns. the main difference between --searchopts and the standard search terms is that the former does not highlight results in the output, and you can use them for more fine-grained filtering. and yeah you can put both of these in your config to change default search filtering behavior π
search also lets you target maintainers in search results β just prefix their npm username with = π«Ά (iykyk)
and if a term starts with /, then it's interpreted as a regular expression and supports standard JavaScript RegExp syntax β in that case search will ignore a trailing /. (note: you must escape or quote many regular expression characters in most shells β fr fr, your shell will eat them alive otherwise π)
π¦ CONFIGURATION π¦
π json
- Default:
false - Type: Boolean
whether or not to output JSON data, rather than the normal output.
- In
npm pkg setit enables parsing set values withJSON.parse()before saving them to yourpackage.json.
not supported by all npm commands π (so don't be surprised if some command ignores it, it's not being rude on purpose)
π color
- Default:
trueunless theNO_COLORenviron is set to something other than'0' - Type:
"always"or Boolean
if false, never shows colors. if "always" then always shows colors. if true, then only prints color codes for tty file descriptors. slay β¨
π parseable
- Default:
false - Type: Boolean
output parseable results from commands that write to standard output. for npm search, this will be tab-separated table format π iconic honestly
π§ description
- Default:
true - Type: Boolean
show the description in npm search π (turn it off if you like your results mysterious)
β searchlimit
- Default:
20 - Type: Number
number of items to limit search results to. will not apply at all to legacy searches π noted and respected.
π searchopts
- Default:
"" - Type: String
space-separated options that are always passed to search.
π searchexclude
- Default:
"" - Type: String
space-separated options that limit the results from search. (the opposite bestie of the one above)
π₯ registry
- Default:
"https://registry.npmjs.org/" - Type: URL
the base URL of the npm registry.
π«Ά prefer-online
- Default:
false - Type: Boolean
if true, staleness checks for cached data will be forced, making the CLI look for updates immediately even for fresh package data.
π prefer-offline
- Default:
false - Type: Boolean
if true, staleness checks for cached data will be bypassed, but missing data will be requested from the server. to force full offline mode, use --offline.
π offline
- Default:
false - Type: Boolean
force offline mode: no network requests will be done during install. to allow the CLI to fill in missing cache data, see --prefer-offline.
π SEE ALSO π
npm help registrynpm help confignpm help npmrcnpm help viewnpm help cache- https://npm.im/npm-registry-fetch
okay that's the whole page, you're officially educated π
go forth and search. this was NPM@12.2.1, dated October 2026 (yes bestie, from the future πΈ), on the manual page NPM-SEARCH(1). mwah π«Άβ¨
π¦ where this page comes from
- arch rolling: npm 12.2.1-1 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms