2022-03-03 21:38:08 +00:00
|
|
|
.TH "NPM\-SEARCH" "1" "March 2022" "" ""
|
2011-11-26 09:21:03 -08:00
|
|
|
.SH "NAME"
|
2019-11-18 21:01:39 +02:00
|
|
|
\fBnpm-search\fR \- Search for packages
|
2019-11-05 14:55:08 -05:00
|
|
|
.SS Synopsis
|
2014-09-24 14:41:07 -07:00
|
|
|
.P
|
|
|
|
.RS 2
|
2014-11-04 15:08:12 -08:00
|
|
|
.nf
|
2022-02-24 21:41:49 +00:00
|
|
|
npm search [search terms \.\.\.]
|
2015-10-09 23:13:57 -07:00
|
|
|
|
2016-03-29 23:30:51 -07:00
|
|
|
aliases: s, se, find
|
2014-11-04 15:08:12 -08:00
|
|
|
.fi
|
2014-09-24 14:41:07 -07:00
|
|
|
.RE
|
2021-03-23 14:58:11 -04:00
|
|
|
.P
|
|
|
|
Note: This command is unaware of workspaces\.
|
2019-11-05 14:55:08 -05:00
|
|
|
.SS Description
|
2014-09-24 14:41:07 -07:00
|
|
|
.P
|
2016-12-18 20:22:09 -08:00
|
|
|
Search the registry for packages matching the search terms\. \fBnpm search\fP
|
|
|
|
performs a linear, incremental, lexically\-ordered search through package
|
2021-01-15 16:09:24 -05:00
|
|
|
metadata for all files in the registry\. If your terminal has color
|
|
|
|
support, it will further highlight the matches in the results\. This can
|
|
|
|
be disabled with the config item \fBcolor\fP
|
2011-11-26 09:21:03 -08:00
|
|
|
.P
|
2021-01-15 16:09:24 -05:00
|
|
|
Additionally, using the \fB\-\-searchopts\fP and \fB\-\-searchexclude\fP options
|
|
|
|
paired with more search terms will include and exclude further patterns\.
|
|
|
|
The main difference between \fB\-\-searchopts\fP and the standard search terms
|
|
|
|
is that the former does not highlight results in the output and you can
|
|
|
|
use them more fine\-grained filtering\. Additionally, you can add both of
|
|
|
|
these to your config to change default search filtering behavior\.
|
2016-12-18 20:22:09 -08:00
|
|
|
.P
|
|
|
|
Search also allows targeting of maintainers in search results, by prefixing
|
|
|
|
their npm username with \fB=\fP\|\.
|
|
|
|
.P
|
2021-01-15 16:09:24 -05:00
|
|
|
If a term starts with \fB/\fP, then it's interpreted as a regular expression
|
|
|
|
and supports standard JavaScript RegExp syntax\. In this case search will
|
|
|
|
ignore a trailing \fB/\fP \. (Note you must escape or quote many regular
|
|
|
|
expression characters in most shells\.)
|
2019-11-05 14:55:08 -05:00
|
|
|
.SS Configuration
|
2021-05-20 15:54:50 -04:00
|
|
|
.SS \fBlong\fP
|
2016-12-18 20:22:09 -08:00
|
|
|
.RS 0
|
|
|
|
.IP \(bu 2
|
2021-05-20 15:54:50 -04:00
|
|
|
Default: false
|
2016-12-18 20:22:09 -08:00
|
|
|
.IP \(bu 2
|
|
|
|
Type: Boolean
|
|
|
|
|
2021-01-15 16:09:24 -05:00
|
|
|
.RE
|
2021-05-20 15:54:50 -04:00
|
|
|
.P
|
|
|
|
Show extended information in \fBls\fP, \fBsearch\fP, and \fBhelp\-search\fP\|\.
|
|
|
|
.SS \fBjson\fP
|
2021-01-15 16:09:24 -05:00
|
|
|
.RS 0
|
|
|
|
.IP \(bu 2
|
2021-05-20 15:54:50 -04:00
|
|
|
Default: false
|
2021-01-15 16:09:24 -05:00
|
|
|
.IP \(bu 2
|
|
|
|
Type: Boolean
|
|
|
|
|
2016-12-18 20:22:09 -08:00
|
|
|
.RE
|
|
|
|
.P
|
2021-05-20 15:54:50 -04:00
|
|
|
Whether or not to output JSON data, rather than the normal output\.
|
2021-07-15 20:09:18 +00:00
|
|
|
.RS 0
|
|
|
|
.IP \(bu 2
|
|
|
|
In \fBnpm pkg set\fP it enables parsing set values with JSON\.parse() before
|
|
|
|
saving them to your \fBpackage\.json\fP\|\.
|
|
|
|
|
|
|
|
.RE
|
2021-05-20 15:54:50 -04:00
|
|
|
.P
|
|
|
|
Not supported by all npm commands\.
|
|
|
|
.SS \fBcolor\fP
|
2016-12-18 20:22:09 -08:00
|
|
|
.RS 0
|
|
|
|
.IP \(bu 2
|
2021-05-20 15:54:50 -04:00
|
|
|
Default: true unless the NO_COLOR environ is set to something other than '0'
|
2016-12-18 20:22:09 -08:00
|
|
|
.IP \(bu 2
|
2021-05-20 15:54:50 -04:00
|
|
|
Type: "always" or Boolean
|
2016-12-18 20:22:09 -08:00
|
|
|
|
|
|
|
.RE
|
|
|
|
.P
|
2021-05-20 15:54:50 -04:00
|
|
|
If false, never shows colors\. If \fB"always"\fP then always shows colors\. If
|
|
|
|
true, then only prints color codes for tty file descriptors\.
|
|
|
|
.SS \fBparseable\fP
|
2016-12-18 20:22:09 -08:00
|
|
|
.RS 0
|
|
|
|
.IP \(bu 2
|
|
|
|
Default: false
|
|
|
|
.IP \(bu 2
|
|
|
|
Type: Boolean
|
|
|
|
|
|
|
|
.RE
|
|
|
|
.P
|
2021-05-20 15:54:50 -04:00
|
|
|
Output parseable results from commands that write to standard output\. For
|
|
|
|
\fBnpm search\fP, this will be tab\-separated table format\.
|
|
|
|
.SS \fBdescription\fP
|
2014-09-24 14:41:07 -07:00
|
|
|
.RS 0
|
|
|
|
.IP \(bu 2
|
2021-05-20 15:54:50 -04:00
|
|
|
Default: true
|
2014-09-24 14:41:07 -07:00
|
|
|
.IP \(bu 2
|
2014-01-19 21:13:20 -08:00
|
|
|
Type: Boolean
|
2014-09-24 14:41:07 -07:00
|
|
|
|
|
|
|
.RE
|
2014-01-19 21:13:20 -08:00
|
|
|
.P
|
2021-05-20 15:54:50 -04:00
|
|
|
Show the description in \fBnpm search\fP
|
|
|
|
.SS \fBsearchopts\fP
|
2016-12-18 20:22:09 -08:00
|
|
|
.RS 0
|
|
|
|
.IP \(bu 2
|
|
|
|
Default: ""
|
|
|
|
.IP \(bu 2
|
|
|
|
Type: String
|
|
|
|
|
|
|
|
.RE
|
|
|
|
.P
|
|
|
|
Space\-separated options that are always passed to search\.
|
2021-05-20 15:54:50 -04:00
|
|
|
.SS \fBsearchexclude\fP
|
2016-12-18 20:22:09 -08:00
|
|
|
.RS 0
|
|
|
|
.IP \(bu 2
|
|
|
|
Default: ""
|
|
|
|
.IP \(bu 2
|
|
|
|
Type: String
|
|
|
|
|
|
|
|
.RE
|
|
|
|
.P
|
|
|
|
Space\-separated options that limit the results from search\.
|
2021-05-20 15:54:50 -04:00
|
|
|
.SS \fBregistry\fP
|
2016-03-29 23:30:51 -07:00
|
|
|
.RS 0
|
|
|
|
.IP \(bu 2
|
2021-05-20 15:54:50 -04:00
|
|
|
Default: "https://registry\.npmjs\.org/"
|
2016-03-29 23:30:51 -07:00
|
|
|
.IP \(bu 2
|
2021-05-20 15:54:50 -04:00
|
|
|
Type: URL
|
2016-03-29 23:30:51 -07:00
|
|
|
|
|
|
|
.RE
|
|
|
|
.P
|
2021-05-20 15:54:50 -04:00
|
|
|
The base URL of the npm registry\.
|
|
|
|
.SS \fBprefer\-online\fP
|
|
|
|
.RS 0
|
|
|
|
.IP \(bu 2
|
|
|
|
Default: false
|
|
|
|
.IP \(bu 2
|
|
|
|
Type: Boolean
|
|
|
|
|
|
|
|
.RE
|
2021-01-15 16:09:24 -05:00
|
|
|
.P
|
2021-05-20 15:54:50 -04:00
|
|
|
If true, staleness checks for cached data will be forced, making the CLI
|
|
|
|
look for updates immediately even for fresh package data\.
|
|
|
|
.SS \fBprefer\-offline\fP
|
|
|
|
.RS 0
|
|
|
|
.IP \(bu 2
|
|
|
|
Default: false
|
|
|
|
.IP \(bu 2
|
|
|
|
Type: Boolean
|
|
|
|
|
|
|
|
.RE
|
2021-01-15 16:09:24 -05:00
|
|
|
.P
|
2021-05-20 15:54:50 -04:00
|
|
|
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
|
|
|
|
\fB\-\-offline\fP\|\.
|
|
|
|
.SS \fBoffline\fP
|
|
|
|
.RS 0
|
|
|
|
.IP \(bu 2
|
|
|
|
Default: false
|
|
|
|
.IP \(bu 2
|
|
|
|
Type: Boolean
|
|
|
|
|
|
|
|
.RE
|
2021-01-15 16:09:24 -05:00
|
|
|
.P
|
2021-05-20 15:54:50 -04:00
|
|
|
Force offline mode: no network requests will be done during install\. To
|
|
|
|
allow the CLI to fill in missing cache data, see \fB\-\-prefer\-offline\fP\|\.
|
2019-11-05 14:55:08 -05:00
|
|
|
.SS See Also
|
2014-09-24 14:41:07 -07:00
|
|
|
.RS 0
|
|
|
|
.IP \(bu 2
|
2019-11-05 14:55:08 -05:00
|
|
|
npm help registry
|
2014-09-24 14:41:07 -07:00
|
|
|
.IP \(bu 2
|
2019-11-18 21:01:39 +02:00
|
|
|
npm help config
|
2014-09-24 14:41:07 -07:00
|
|
|
.IP \(bu 2
|
2019-11-05 14:55:08 -05:00
|
|
|
npm help npmrc
|
2014-09-24 14:41:07 -07:00
|
|
|
.IP \(bu 2
|
2019-11-18 21:01:39 +02:00
|
|
|
npm help view
|
2021-01-15 16:09:24 -05:00
|
|
|
.IP \(bu 2
|
|
|
|
npm help cache
|
|
|
|
.IP \(bu 2
|
|
|
|
https://npm\.im/npm\-registry\-fetch
|
2014-09-24 14:41:07 -07:00
|
|
|
|
|
|
|
.RE
|