← 返回命令列表

Linux command

npm-help 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Get help on a command

npm help [install]

Search help topics by keyword

npm help-search [dependency]

Open help in the browser

npm help [command] --viewer browser

Read the npm overview

npm help npm

Open the help index

npm help help

说明

npm help displays the npm manual page for a topic. By default it shells out to man(1) on Unix, but with --viewer browser it opens the rendered HTML on docs.npmjs.com. If no exact match exists, npm help falls back to npm help-search, which performs a keyword search across all npm man pages and prints relevance-ranked excerpts.

参数

--viewer _TYPE_
Help viewer to use: _man_ (default on Unix), _browser_, or _woman_ (Emacs). On Windows the default is _browser_.
--help
Display help for the help command itself.

FAQ

What is the npm-help command used for?

npm help displays the npm manual page for a topic. By default it shells out to man(1) on Unix, but with --viewer browser it opens the rendered HTML on docs.npmjs.com. If no exact match exists, npm help falls back to npm help-search, which performs a keyword search across all npm man pages and prints relevance-ranked excerpts.

How do I run a basic npm-help example?

Run `npm help [install]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --viewer _TYPE_ do in npm-help?

Help viewer to use: _man_ (default on Unix), _browser_, or _woman_ (Emacs). On Windows the default is _browser_.