1NPM-SEARCH(1) NPM-SEARCH(1)
2
3
4
6 npm-search - Search for packages
7
8 Synopsis
9 npm search [search terms ...]
10
11 aliases: find, s, se
12
13 Note: This command is unaware of workspaces.
14
15 Description
16 Search the registry for packages matching the search terms. npm search
17 performs a linear, incremental, lexically-ordered search through pack‐
18 age metadata for all files in the registry. If your terminal has color
19 support, it will further highlight the matches in the results. This can
20 be disabled with the config item color
21
22 Additionally, using the --searchopts and --searchexclude options paired
23 with more search terms will include and exclude further patterns. The
24 main difference between --searchopts and the standard search terms is
25 that the former does not highlight results in the output and you can
26 use them more fine-grained filtering. Additionally, you can add both of
27 these to your config to change default search filtering behavior.
28
29 Search also allows targeting of maintainers in search results, by pre‐
30 fixing their npm username with =.
31
32 If a term starts with /, then it's interpreted as a regular expression
33 and supports standard JavaScript RegExp syntax. In this case search
34 will ignore a trailing / . (Note you must escape or quote many regular
35 expression characters in most shells.)
36
37 Configuration
38 long
39 • Default: false
40
41 • Type: Boolean
42
43
44 Show extended information in ls, search, and help-search.
45
46 json
47 • Default: false
48
49 • Type: Boolean
50
51
52 Whether or not to output JSON data, rather than the normal output.
53
54 • In npm pkg set it enables parsing set values with JSON.parse() be‐
55 fore saving them to your package.json.
56
57
58 Not supported by all npm commands.
59
60 color
61 • Default: true unless the NO_COLOR environ is set to something other
62 than '0'
63
64 • Type: "always" or Boolean
65
66
67 If false, never shows colors. If "always" then always shows colors. If
68 true, then only prints color codes for tty file descriptors.
69
70 parseable
71 • Default: false
72
73 • Type: Boolean
74
75
76 Output parseable results from commands that write to standard output.
77 For npm search, this will be tab-separated table format.
78
79 description
80 • Default: true
81
82 • Type: Boolean
83
84
85 Show the description in npm search
86
87 searchopts
88 • Default: ""
89
90 • Type: String
91
92
93 Space-separated options that are always passed to search.
94
95 searchexclude
96 • Default: ""
97
98 • Type: String
99
100
101 Space-separated options that limit the results from search.
102
103 registry
104 • Default: "https://registry.npmjs.org/"
105
106 • Type: URL
107
108
109 The base URL of the npm registry.
110
111 prefer-online
112 • Default: false
113
114 • Type: Boolean
115
116
117 If true, staleness checks for cached data will be forced, making the
118 CLI look for updates immediately even for fresh package data.
119
120 prefer-offline
121 • Default: false
122
123 • Type: Boolean
124
125
126 If true, staleness checks for cached data will be bypassed, but missing
127 data will be requested from the server. To force full offline mode, use
128 --offline.
129
130 offline
131 • Default: false
132
133 • Type: Boolean
134
135
136 Force offline mode: no network requests will be done during install. To
137 allow the CLI to fill in missing cache data, see --prefer-offline.
138
139 See Also
140 • npm help registry
141
142 • npm help config
143
144 • npm help npmrc
145
146 • npm help view
147
148 • npm help cache
149
150 • https://npm.im/npm-registry-fetch
151
152
153
154 November 2023 NPM-SEARCH(1)