summaryrefslogtreecommitdiff
path: root/deps/npm/man/man1/npm-search.1
blob: 1ee0f51b1709efbd073ea4ca97cda66fe1091ebd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
.TH "NPM\-SEARCH" "1" "December 2018" "" ""
.SH "NAME"
\fBnpm-search\fR \- Search for packages
.SH SYNOPSIS
.P
.RS 2
.nf
npm search [\-l|\-\-long] [\-\-json] [\-\-parseable] [\-\-no\-description] [search terms \.\.\.]

aliases: s, se, find
.fi
.RE
.SH DESCRIPTION
.P
Search the registry for packages matching the search terms\. \fBnpm search\fP
performs a linear, incremental, lexically\-ordered search through package
metadata for all files in the registry\. If color is enabled, it will further
highlight the matches in the results\.
.P
Additionally, using the \fB\-\-searchopts\fP and \fB\-\-searchexclude\fP options paired with
more search terms will respectively 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 can be used for more
fine\-grained filtering\. Additionally, both of these can be added to \fB\|\.npmrc\fP for
default search filtering behavior\.
.P
Search also allows targeting of maintainers in search results, by prefixing
their npm username with \fB=\fP\|\.
.P
If a term starts with \fB/\fP, then it's interpreted as a regular expression and
supports standard JavaScript RegExp syntax\. A trailing \fB/\fP will be ignored in
this case\. (Note that many regular expression characters must be escaped or
quoted in most shells\.)
.SS A Note on caching
.SH CONFIGURATION
.SS description
.RS 0
.IP \(bu 2
Default: true
.IP \(bu 2
Type: Boolean

.RE
.P
Used as \fB\-\-no\-description\fP, disables search matching in package descriptions and
suppresses display of that field in results\.
.SS json
.RS 0
.IP \(bu 2
Default: false
.IP \(bu 2
Type: Boolean

.RE
.P
Output search results as a JSON array\.
.SS parseable
.RS 0
.IP \(bu 2
Default: false
.IP \(bu 2
Type: Boolean

.RE
.P
Output search results as lines with tab\-separated columns\.
.SS long
.RS 0
.IP \(bu 2
Default: false
.IP \(bu 2
Type: Boolean

.RE
.P
Display full package descriptions and other long text across multiple
lines\. When disabled (default) search results are truncated to fit
neatly on a single line\. Modules with extremely long names will
fall on multiple lines\.
.SS searchopts
.RS 0
.IP \(bu 2
Default: ""
.IP \(bu 2
Type: String

.RE
.P
Space\-separated options that are always passed to search\.
.SS searchexclude
.RS 0
.IP \(bu 2
Default: ""
.IP \(bu 2
Type: String

.RE
.P
Space\-separated options that limit the results from search\.
.SS searchstaleness
.RS 0
.IP \(bu 2
Default: 900 (15 minutes)
.IP \(bu 2
Type: Number

.RE
.P
The age of the cache, in seconds, before another registry request is made\.
.SS registry
.RS 0
.IP \(bu 2
Default: https://
.IP \(bu 2
Type: url

.RE
.P
Search the specified registry for modules\. If you have configured npm to point
to a different default registry, such as your internal private module
repository, \fBnpm search\fP will default to that registry when searching\. Pass a
different registry url such as the default above in order to override this
setting\.
.SH SEE ALSO
.RS 0
.IP \(bu 2
npm help 7 registry
.IP \(bu 2
npm help config
.IP \(bu 2
npm help 7 config
.IP \(bu 2
npm help 5 npmrc
.IP \(bu 2
npm help view

.RE