LinuxCommandLibrary

npm-search

searches the npm registry for packages matching the given terms

TLDR

Search for packages

$ npm search [query]
copy
Search with multiple terms
$ npm search [react] [router]
copy
Output as JSON
$ npm search --json [query]
copy
Limit results
$ npm search --searchlimit=[20] [query]
copy
Long format output
$ npm search --long [query]
copy

SYNOPSIS

npm search [options] [terms...]

DESCRIPTION

npm search searches the npm registry for packages matching the given terms. It searches package names, descriptions, and keywords.
Results include package name, description, author, date, version, and keywords.

PARAMETERS

--json

JSON output.
--long
Extended information.
--searchlimit n
Limit results.
--searchopts opts
Search options.
--searchexclude terms
Exclude terms.
--registry url
Search specific registry.

EXAMPLE OUTPUT

$ NAME         DESCRIPTION                    AUTHOR    DATE
lodash       Lodash modular utilities       jdalton   2023-01
express      Fast web framework             dougwilson 2022-10
copy

ALTERNATIVES

$ # Use npms.io for better search
# Web: https://www.npmjs.com/search?q=query

# Use npm-search-cli
npms query
copy

CAVEATS

Registry search can be slow. Results may differ from website. Consider web interface for complex searches.

HISTORY

npm search has been part of npm since early versions, providing command-line access to the npm registry search functionality.

SEE ALSO

npm(1), npm-view(1), npm-info(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community