PATH:
usr
/
local
/
lib
/
node_modules
/
npm
/
docs
/
content
/
cli-commands
--- section: cli-commands title: npm-search description: Search for packages --- # npm-search(1) ## Search for packages ### Synopsis ```bash npm search [-l|--long] [--json] [--parseable] [--no-description] [search terms ...] aliases: s, se, find ``` ### Description Search the registry for packages matching the search terms. `npm search` 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. Additionally, using the `--searchopts` and `--searchexclude` options paired with more search terms will respectively 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 can be used for more fine-grained filtering. Additionally, both of these can be added to `.npmrc` for default search filtering behavior. Search also allows targeting of maintainers in search results, by prefixing their npm username with `=`. If a term starts with `/`, then it's interpreted as a regular expression and supports standard JavaScript RegExp syntax. A trailing `/` will be ignored in this case. (Note that many regular expression characters must be escaped or quoted in most shells.) ### A Note on caching ### Configuration #### description * Default: true * Type: Boolean Used as `--no-description`, disables search matching in package descriptions and suppresses display of that field in results. #### json * Default: false * Type: Boolean Output search results as a JSON array. #### parseable * Default: false * Type: Boolean Output search results as lines with tab-separated columns. #### long * Default: false * Type: Boolean 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. #### 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. #### searchstaleness * Default: 900 (15 minutes) * Type: Number The age of the cache, in seconds, before another registry request is made. #### registry * Default: https://registry.npmjs.org/ * Type: url 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, `npm search` will default to that registry when searching. Pass a different registry url such as the default above in order to override this setting. ### See Also * [npm registry](/using-npm/registry) * [npm config](/cli-commands/npm-config) * [npmrc](/configuring-npm/npmrc) * [npm view](/cli-commands/npm-view)
[-] npm-build.md
[edit]
[-] npm-bundle.md
[edit]
[-] npm-prune.md
[edit]
[-] npm-repo.md
[edit]
[-] npm-owner.md
[edit]
[-] npm-edit.md
[edit]
[-] npm-audit.md
[edit]
[-] npm-unpublish.md
[edit]
[-] npm-bin.md
[edit]
[-] npm-test.md
[edit]
[-] npm-run-script.md
[edit]
[-] npm-completion.md
[edit]
[-] npm-adduser.md
[edit]
[+]
..
[-] npm-deprecate.md
[edit]
[-] npm-link.md
[edit]
[-] npm-root.md
[edit]
[-] npm-dist-tag.md
[edit]
[-] npm-update.md
[edit]
[-] npm-start.md
[edit]
[-] npm-config.md
[edit]
[-] npm-hook.md
[edit]
[-] npm-token.md
[edit]
[-] npm-pack.md
[edit]
[-] npm-stars.md
[edit]
[-] npm-publish.md
[edit]
[-] npm-whoami.md
[edit]
[-] npm-install-ci-test.md
[edit]
[-] npm-prefix.md
[edit]
[-] npm-shrinkwrap.md
[edit]
[-] npm.md
[edit]
[-] npm-install-test.md
[edit]
[-] npm-version.md
[edit]
[-] npm-team.md
[edit]
[-] npm-fund.md
[edit]
[-] npm-restart.md
[edit]
[-] npm-star.md
[edit]
[-] npm-ci.md
[edit]
[-] npm-ls.md
[edit]
[-] npm-explore.md
[edit]
[-] npm-view.md
[edit]
[-] npm-dedupe.md
[edit]
[-] npm-cache.md
[edit]
[-] npm-uninstall.md
[edit]
[-] npm-ping.md
[edit]
[-] npm-install.md
[edit]
[-] npm-access.md
[edit]
[-] npm-help-search.md
[edit]
[-] npm-help.md
[edit]
[-] npm-org.md
[edit]
[-] npm-init.md
[edit]
[-] npm-logout.md
[edit]
[-] npm-doctor.md
[edit]
[-] npm-stop.md
[edit]
[-] npm-bugs.md
[edit]
[-] npm-rebuild.md
[edit]
[-] npm-docs.md
[edit]
[-] npm-profile.md
[edit]
[-] npm-outdated.md
[edit]
[-] npm-search.md
[edit]