Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/cli/npm-bin.md2
-rw-r--r--doc/cli/npm-bugs.md3
-rw-r--r--doc/cli/npm-build.md2
-rw-r--r--doc/cli/npm-completion.md7
-rw-r--r--doc/cli/npm-config.md1
-rw-r--r--doc/cli/npm-deprecate.md2
-rw-r--r--doc/cli/npm-docs.md4
-rw-r--r--doc/cli/npm-edit.md2
-rw-r--r--doc/cli/npm-explore.md2
-rw-r--r--doc/cli/npm-help-search.md2
-rw-r--r--doc/cli/npm-help.md3
-rw-r--r--doc/cli/npm-init.md2
-rw-r--r--doc/cli/npm-install.md22
-rw-r--r--doc/cli/npm-link.md7
-rw-r--r--doc/cli/npm-logout.md2
-rw-r--r--doc/cli/npm-ls.md7
-rw-r--r--doc/cli/npm-outdated.md2
-rw-r--r--doc/cli/npm-owner.md6
-rw-r--r--doc/cli/npm-pack.md10
-rw-r--r--doc/cli/npm-prune.md3
-rw-r--r--doc/cli/npm-publish.md6
-rw-r--r--doc/cli/npm-rebuild.md6
-rw-r--r--doc/cli/npm-repo.md3
-rw-r--r--doc/cli/npm-root.md2
-rw-r--r--doc/cli/npm-run-script.md5
-rw-r--r--doc/cli/npm-search.md4
-rw-r--r--doc/cli/npm-star.md4
-rw-r--r--doc/cli/npm-stars.md3
-rw-r--r--doc/cli/npm-tag.md3
-rw-r--r--doc/cli/npm-uninstall.md5
-rw-r--r--doc/cli/npm-unpublish.md2
-rw-r--r--doc/cli/npm-update.md2
-rw-r--r--doc/cli/npm-version.md4
-rw-r--r--doc/cli/npm-view.md5
-rw-r--r--doc/cli/npm-whoami.md2
-rw-r--r--lib/adduser.js2
-rw-r--r--lib/bin.js2
-rw-r--r--lib/bugs.js2
-rw-r--r--lib/build.js2
-rw-r--r--lib/completion.js4
-rw-r--r--lib/dedupe.js2
-rw-r--r--lib/docs.js4
-rw-r--r--lib/edit.js4
-rw-r--r--lib/explore.js2
-rw-r--r--lib/init.js2
-rw-r--r--lib/install.js16
-rw-r--r--lib/link.js3
-rw-r--r--lib/logout.js2
-rw-r--r--lib/ls.js3
-rw-r--r--lib/outdated.js2
-rw-r--r--lib/owner.js6
-rw-r--r--lib/pack.js2
-rw-r--r--lib/prefix.js2
-rw-r--r--lib/prune.js2
-rw-r--r--lib/publish.js4
-rw-r--r--lib/rebuild.js2
-rw-r--r--lib/repo.js2
-rw-r--r--lib/root.js2
-rw-r--r--lib/run-script.js3
-rw-r--r--lib/search.js3
-rw-r--r--lib/star.js4
-rw-r--r--lib/stars.js2
-rw-r--r--lib/tag.js3
-rw-r--r--lib/uninstall.js4
-rw-r--r--lib/unpublish.js2
-rw-r--r--lib/update.js2
-rw-r--r--lib/version.js2
-rw-r--r--lib/view.js3
-rw-r--r--lib/whoami.js2
69 files changed, 130 insertions, 121 deletions
diff --git a/doc/cli/npm-bin.md b/doc/cli/npm-bin.md
index 33863b457..8e1abbee8 100644
--- a/doc/cli/npm-bin.md
+++ b/doc/cli/npm-bin.md
@@ -3,7 +3,7 @@ npm-bin(1) -- Display npm bin folder
## SYNOPSIS
- npm bin
+ npm bin [--global]
## DESCRIPTION
diff --git a/doc/cli/npm-bugs.md b/doc/cli/npm-bugs.md
index 002d9f755..d2ad534fa 100644
--- a/doc/cli/npm-bugs.md
+++ b/doc/cli/npm-bugs.md
@@ -3,8 +3,7 @@ npm-bugs(1) -- Bugs for a package in a web browser maybe
## SYNOPSIS
- npm bugs <pkgname>
- npm bugs (with no args in a package dir)
+ npm bugs [<pkgname>]
## DESCRIPTION
diff --git a/doc/cli/npm-build.md b/doc/cli/npm-build.md
index 4d3467a16..019f22585 100644
--- a/doc/cli/npm-build.md
+++ b/doc/cli/npm-build.md
@@ -3,7 +3,7 @@ npm-build(1) -- Build a package
## SYNOPSIS
- npm build <package-folder>
+ npm build [<package-folder>]
* `<package-folder>`:
A folder containing a `package.json` file in its root.
diff --git a/doc/cli/npm-completion.md b/doc/cli/npm-completion.md
index bec0f6086..6c7f39356 100644
--- a/doc/cli/npm-completion.md
+++ b/doc/cli/npm-completion.md
@@ -3,7 +3,7 @@ npm-completion(1) -- Tab Completion for npm
## SYNOPSIS
- . <(npm completion)
+ source <(npm completion)
## DESCRIPTION
@@ -12,7 +12,10 @@ Enables tab-completion in all npm commands.
The synopsis above
loads the completions into your current shell. Adding it to
your ~/.bashrc or ~/.zshrc will make the completions available
-everywhere.
+everywhere:
+
+ npm completion >> ~/.bashrc
+ npm completion >> ~/.zshrc
You may of course also pipe the output of npm completion to a file
such as `/usr/local/etc/bash_completion.d/npm` if you have a system
diff --git a/doc/cli/npm-config.md b/doc/cli/npm-config.md
index 1d978c9de..119840ef0 100644
--- a/doc/cli/npm-config.md
+++ b/doc/cli/npm-config.md
@@ -8,7 +8,6 @@ npm-config(1) -- Manage the npm configuration files
npm config delete <key>
npm config list
npm config edit
- npm c [set|get|delete|list]
npm get <key>
npm set <key> <value> [--global]
diff --git a/doc/cli/npm-deprecate.md b/doc/cli/npm-deprecate.md
index e62579349..1be6f491b 100644
--- a/doc/cli/npm-deprecate.md
+++ b/doc/cli/npm-deprecate.md
@@ -3,7 +3,7 @@ npm-deprecate(1) -- Deprecate a version of a package
## SYNOPSIS
- npm deprecate <name>[@<version>] <message>
+ npm deprecate <pkg>[@<version>] <message>
## DESCRIPTION
diff --git a/doc/cli/npm-docs.md b/doc/cli/npm-docs.md
index 5db3d9f7e..f5064c55e 100644
--- a/doc/cli/npm-docs.md
+++ b/doc/cli/npm-docs.md
@@ -4,9 +4,9 @@ npm-docs(1) -- Docs for a package in a web browser maybe
## SYNOPSIS
npm docs [<pkgname> [<pkgname> ...]]
- npm docs (with no args in a package dir)
+ npm docs .
npm home [<pkgname> [<pkgname> ...]]
- npm home (with no args in a package dir)
+ npm home .
## DESCRIPTION
diff --git a/doc/cli/npm-edit.md b/doc/cli/npm-edit.md
index 6a73317b8..89ecfa877 100644
--- a/doc/cli/npm-edit.md
+++ b/doc/cli/npm-edit.md
@@ -3,7 +3,7 @@ npm-edit(1) -- Edit an installed package
## SYNOPSIS
- npm edit <name>[@<version>]
+ npm edit <pkg>[@<version>]
## DESCRIPTION
diff --git a/doc/cli/npm-explore.md b/doc/cli/npm-explore.md
index fded53408..b66e08bfb 100644
--- a/doc/cli/npm-explore.md
+++ b/doc/cli/npm-explore.md
@@ -3,7 +3,7 @@ npm-explore(1) -- Browse an installed package
## SYNOPSIS
- npm explore <name> [ -- <cmd>]
+ npm explore <pkg> [ -- <cmd>]
## DESCRIPTION
diff --git a/doc/cli/npm-help-search.md b/doc/cli/npm-help-search.md
index 7bf7401ba..0a40f1c43 100644
--- a/doc/cli/npm-help-search.md
+++ b/doc/cli/npm-help-search.md
@@ -3,7 +3,7 @@ npm-help-search(1) -- Search npm help documentation
## SYNOPSIS
- npm help-search some search terms
+ npm help-search <text>
## DESCRIPTION
diff --git a/doc/cli/npm-help.md b/doc/cli/npm-help.md
index 7991b1d38..9fb96c9c2 100644
--- a/doc/cli/npm-help.md
+++ b/doc/cli/npm-help.md
@@ -3,8 +3,7 @@ npm-help(1) -- Get help on npm
## SYNOPSIS
- npm help <topic>
- npm help some search terms
+ npm help <term> [<terms..>]
## DESCRIPTION
diff --git a/doc/cli/npm-init.md b/doc/cli/npm-init.md
index ec4c25bed..e90f9ef04 100644
--- a/doc/cli/npm-init.md
+++ b/doc/cli/npm-init.md
@@ -3,7 +3,7 @@ npm-init(1) -- Interactively create a package.json file
## SYNOPSIS
- npm init [-f|--force|-y|--yes]
+ npm init [--force|-f|--yes|-y]
## DESCRIPTION
diff --git a/doc/cli/npm-install.md b/doc/cli/npm-install.md
index 2ccde25e0..b382b114f 100644
--- a/doc/cli/npm-install.md
+++ b/doc/cli/npm-install.md
@@ -3,15 +3,17 @@ npm-install(1) -- Install a package
## SYNOPSIS
- npm install (with no args in a package dir)
+ npm install (with no args, in package dir)
+ npm install [<@scope>/]<name>
+ npm install [<@scope>/]<name>@<tag>
+ npm install [<@scope>/]<name>@<version>
+ npm install [<@scope>/]<name>@<version range>
npm install <tarball file>
npm install <tarball url>
npm install <folder>
- npm install [@<scope>/]<name> [--save|--save-dev|--save-optional] [--save-exact]
- npm install [@<scope>/]<name>@<tag>
- npm install [@<scope>/]<name>@<version>
- npm install [@<scope>/]<name>@<version range>
- npm i (with any of the previous argument usage)
+
+ alias: npm i
+ common options: [--save|--save-dev|--save-optional] [--save-exact]
## DESCRIPTION
@@ -71,7 +73,7 @@ after packing it up into a tarball (b).
npm install https://github.com/indexzero/forever/tarball/v0.5.6
-* `npm install [@<scope>/]<name> [--save|--save-dev|--save-optional]`:
+* `npm install [<@scope>/]<name> [--save|--save-dev|--save-optional]`:
Do a `<name>@<tag>` install, where `<tag>` is the "tag" config. (See
`npm-config(7)`.)
@@ -124,7 +126,7 @@ after packing it up into a tarball (b).
working directory, then it will try to install that, and only try to
fetch the package by name if it is not valid.
-* `npm install [@<scope>/]<name>@<tag>`:
+* `npm install [<@scope>/]<name>@<tag>`:
Install the version of the package that is referenced by the specified tag.
If the tag does not exist in the registry data for that package, then this
@@ -135,7 +137,7 @@ after packing it up into a tarball (b).
npm install sax@latest
npm install @myorg/mypackage@latest
-* `npm install [@<scope>/]<name>@<version>`:
+* `npm install [<@scope>/]<name>@<version>`:
Install the specified version of the package. This will fail if the
version has not been published to the registry.
@@ -145,7 +147,7 @@ after packing it up into a tarball (b).
npm install sax@0.1.1
npm install @myorg/privatepackage@1.5.0
-* `npm install [@<scope>/]<name>@<version range>`:
+* `npm install [<@scope>/]<name>@<version range>`:
Install a version of the package matching the specified version range. This
will follow the same rules for resolving dependencies described in `package.json(5)`.
diff --git a/doc/cli/npm-link.md b/doc/cli/npm-link.md
index b6d0c143a..344fcbf1a 100644
--- a/doc/cli/npm-link.md
+++ b/doc/cli/npm-link.md
@@ -3,9 +3,10 @@ npm-link(1) -- Symlink a package folder
## SYNOPSIS
- npm link (in package folder)
- npm link [@<scope>/]<pkgname>
- npm ln (with any of the previous argument usage)
+ npm link (in package dir)
+ npm link [<@scope>/]<pkg>[@<version>]
+
+ alias: npm ln
## DESCRIPTION
diff --git a/doc/cli/npm-logout.md b/doc/cli/npm-logout.md
index 867953c02..411ea67e6 100644
--- a/doc/cli/npm-logout.md
+++ b/doc/cli/npm-logout.md
@@ -3,7 +3,7 @@ npm-logout(1) -- Log out of the registry
## SYNOPSIS
- npm logout [--registry=url] [--scope=@orgname]
+ npm logout [--registry=<url>] [--scope=<@scope>]
## DESCRIPTION
diff --git a/doc/cli/npm-ls.md b/doc/cli/npm-ls.md
index fa93e836e..efd981d67 100644
--- a/doc/cli/npm-ls.md
+++ b/doc/cli/npm-ls.md
@@ -3,10 +3,9 @@ npm-ls(1) -- List installed packages
## SYNOPSIS
- npm list [[@<scope>/]<pkg> ...]
- npm ls [[@<scope>/]<pkg> ...]
- npm la [[@<scope>/]<pkg> ...]
- npm ll [[@<scope>/]<pkg> ...]
+ npm ls [[<@scope>/]<pkg> ...]
+
+ aliases: list, la, ll
## DESCRIPTION
diff --git a/doc/cli/npm-outdated.md b/doc/cli/npm-outdated.md
index aa2a7d5dd..bdc9b9b8e 100644
--- a/doc/cli/npm-outdated.md
+++ b/doc/cli/npm-outdated.md
@@ -3,7 +3,7 @@ npm-outdated(1) -- Check for outdated packages
## SYNOPSIS
- npm outdated [<name> [<name> ...]]
+ npm outdated [[<@scope>/]<pkg> ...]
## DESCRIPTION
diff --git a/doc/cli/npm-owner.md b/doc/cli/npm-owner.md
index b400f7637..1047a09bb 100644
--- a/doc/cli/npm-owner.md
+++ b/doc/cli/npm-owner.md
@@ -3,9 +3,9 @@ npm-owner(1) -- Manage package owners
## SYNOPSIS
- npm owner ls <package name>
- npm owner add <user> <package name>
- npm owner rm <user> <package name>
+ npm owner add <user> [<@scope>/]<pkg>
+ npm owner rm <user> [<@scope>/]<pkg>
+ npm owner ls [<@scope>/]<pkg>
## DESCRIPTION
diff --git a/doc/cli/npm-pack.md b/doc/cli/npm-pack.md
index 42bc1564b..f44f5e362 100644
--- a/doc/cli/npm-pack.md
+++ b/doc/cli/npm-pack.md
@@ -3,15 +3,15 @@ npm-pack(1) -- Create a tarball from a package
## SYNOPSIS
- npm pack [<pkg> [<pkg> ...]]
+ npm pack [[<@scope>/]<pkg>...]
## DESCRIPTION
For anything that's installable (that is, a package folder, tarball,
-tarball url, name@tag, name@version, or name), this command will fetch
-it to the cache, and then copy the tarball to the current working
-directory as `<name>-<version>.tgz`, and then write the filenames out to
-stdout.
+tarball url, name@tag, name@version, name, or scoped name), this
+command will fetch it to the cache, and then copy the tarball to the
+current working directory as `<name>-<version>.tgz`, and then write
+the filenames out to stdout.
If the same package is specified multiple times, then the file will be
overwritten the second time.
diff --git a/doc/cli/npm-prune.md b/doc/cli/npm-prune.md
index 846a04240..908912211 100644
--- a/doc/cli/npm-prune.md
+++ b/doc/cli/npm-prune.md
@@ -3,8 +3,7 @@ npm-prune(1) -- Remove extraneous packages
## SYNOPSIS
- npm prune [<name> [<name ...]]
- npm prune [<name> [<name ...]] [--production]
+ npm prune [[<@scope>/]<pkg>...] [--production]
## DESCRIPTION
diff --git a/doc/cli/npm-publish.md b/doc/cli/npm-publish.md
index 8c447d0df..8e4da32cd 100644
--- a/doc/cli/npm-publish.md
+++ b/doc/cli/npm-publish.md
@@ -4,8 +4,10 @@ npm-publish(1) -- Publish a package
## SYNOPSIS
- npm publish <tarball> [--tag <tag>] [--access <public|restricted>]
- npm publish <folder> [--tag <tag>] [--access <public|restricted>]
+ npm publish [<tarball>|<folder>] [--tag <tag>] [--access <public|restricted>]
+
+ Publishes '.' if no argument supplied
+ Sets tag 'latest' if no --tag specified
## DESCRIPTION
diff --git a/doc/cli/npm-rebuild.md b/doc/cli/npm-rebuild.md
index 728720868..437737d9f 100644
--- a/doc/cli/npm-rebuild.md
+++ b/doc/cli/npm-rebuild.md
@@ -3,11 +3,9 @@ npm-rebuild(1) -- Rebuild a package
## SYNOPSIS
- npm rebuild [<name> [<name> ...]]
- npm rb [<name> [<name> ...]]
+ npm rebuild [[<@scope>/<name>]...]
-* `<name>`:
- The package to rebuild
+ alias: npm rb
## DESCRIPTION
diff --git a/doc/cli/npm-repo.md b/doc/cli/npm-repo.md
index 6bc6f3b37..523e135e8 100644
--- a/doc/cli/npm-repo.md
+++ b/doc/cli/npm-repo.md
@@ -3,8 +3,7 @@ npm-repo(1) -- Open package repository page in the browser
## SYNOPSIS
- npm repo <pkgname>
- npm repo (with no args in a package dir)
+ npm repo [<pkg>]
## DESCRIPTION
diff --git a/doc/cli/npm-root.md b/doc/cli/npm-root.md
index ca99e1206..a1d5bf862 100644
--- a/doc/cli/npm-root.md
+++ b/doc/cli/npm-root.md
@@ -3,7 +3,7 @@ npm-root(1) -- Display npm root
## SYNOPSIS
- npm root
+ npm root [-g]
## DESCRIPTION
diff --git a/doc/cli/npm-run-script.md b/doc/cli/npm-run-script.md
index 487bd5942..bed05bd37 100644
--- a/doc/cli/npm-run-script.md
+++ b/doc/cli/npm-run-script.md
@@ -3,8 +3,9 @@ npm-run-script(1) -- Run arbitrary package scripts
## SYNOPSIS
- npm run-script [command] [-- <args>]
- npm run [command] [-- <args>]
+ npm run-script <command> [-- <args>...]
+
+ alias: npm run
## DESCRIPTION
diff --git a/doc/cli/npm-search.md b/doc/cli/npm-search.md
index 4757ad320..e7e0defa0 100644
--- a/doc/cli/npm-search.md
+++ b/doc/cli/npm-search.md
@@ -4,8 +4,8 @@ npm-search(1) -- Search for packages
## SYNOPSIS
npm search [--long] [search terms ...]
- npm s [search terms ...]
- npm se [search terms ...]
+
+ aliases: s, se
## DESCRIPTION
diff --git a/doc/cli/npm-star.md b/doc/cli/npm-star.md
index 5c076b3c3..87d90b560 100644
--- a/doc/cli/npm-star.md
+++ b/doc/cli/npm-star.md
@@ -3,8 +3,8 @@ npm-star(1) -- Mark your favorite packages
## SYNOPSIS
- npm star <pkgname> [<pkg>, ...]
- npm unstar <pkgname> [<pkg>, ...]
+ npm star [<pkg>...]
+ npm unstar [<pkg>...]
## DESCRIPTION
diff --git a/doc/cli/npm-stars.md b/doc/cli/npm-stars.md
index 7c28f5b2a..1e225be29 100644
--- a/doc/cli/npm-stars.md
+++ b/doc/cli/npm-stars.md
@@ -3,8 +3,7 @@ npm-stars(1) -- View packages marked as favorites
## SYNOPSIS
- npm stars
- npm stars [username]
+ npm stars [<user>]
## DESCRIPTION
diff --git a/doc/cli/npm-tag.md b/doc/cli/npm-tag.md
index d7118d4e5..357c0862f 100644
--- a/doc/cli/npm-tag.md
+++ b/doc/cli/npm-tag.md
@@ -3,7 +3,8 @@ npm-tag(1) -- Tag a published version
## SYNOPSIS
- npm tag <name>@<version> [<tag>]
+ [DEPRECATED] npm tag <name>@<version> [<tag>]
+ See `dist-tag`
## DESCRIPTION
diff --git a/doc/cli/npm-uninstall.md b/doc/cli/npm-uninstall.md
index 72e3b7d45..73e39a5fb 100644
--- a/doc/cli/npm-uninstall.md
+++ b/doc/cli/npm-uninstall.md
@@ -3,8 +3,9 @@ npm-rm(1) -- Remove a package
## SYNOPSIS
- npm uninstall [@<scope>/]<package> [--save|--save-dev|--save-optional]
- npm rm (with any of the previous argument usage)
+ npm uninstall [<@scope>/]<pkg>[@<version>]... [--save|--save-dev|--save-optional]
+
+ aliases: remove, rm, r, un, unlink
## DESCRIPTION
diff --git a/doc/cli/npm-unpublish.md b/doc/cli/npm-unpublish.md
index 1d5fe9287..0a5731ee1 100644
--- a/doc/cli/npm-unpublish.md
+++ b/doc/cli/npm-unpublish.md
@@ -3,7 +3,7 @@ npm-unpublish(1) -- Remove a package from the registry
## SYNOPSIS
- npm unpublish [@<scope>/]<name>[@<version>]
+ npm unpublish [<@scope>/]<pkg>[@<version>]
## WARNING
diff --git a/doc/cli/npm-update.md b/doc/cli/npm-update.md
index ce31c2891..30a0702d7 100644
--- a/doc/cli/npm-update.md
+++ b/doc/cli/npm-update.md
@@ -3,7 +3,7 @@ npm-update(1) -- Update a package
## SYNOPSIS
- npm update [-g] [<name> [<name> ...]]
+ npm update [-g] [<pkg>...]
## DESCRIPTION
diff --git a/doc/cli/npm-version.md b/doc/cli/npm-version.md
index abcd25b3a..21295027f 100644
--- a/doc/cli/npm-version.md
+++ b/doc/cli/npm-version.md
@@ -5,6 +5,10 @@ npm-version(1) -- Bump a package version
npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease]
+ 'npm -v' or 'npm --version' to print npm version
+ 'npm view <pkg> version' to view a package's published version
+ 'npm ls' to inspect current package/dependency versions
+
## DESCRIPTION
Run this in a package directory to bump the version and write the new
diff --git a/doc/cli/npm-view.md b/doc/cli/npm-view.md
index 683ed09f4..2330c016e 100644
--- a/doc/cli/npm-view.md
+++ b/doc/cli/npm-view.md
@@ -3,8 +3,9 @@ npm-view(1) -- View registry info
## SYNOPSIS
- npm view [@<scope>/]<name>[@<version>] [<field>[.<subfield>]...]
- npm v [@<scope>/]<name>[@<version>] [<field>[.<subfield>]...]
+ npm view [<@scope>/]<name>[@<version>] [<field>[.<subfield>]...]
+
+ aliases: info, show, v
## DESCRIPTION
diff --git a/doc/cli/npm-whoami.md b/doc/cli/npm-whoami.md
index 3ff8837ff..70b6a48f4 100644
--- a/doc/cli/npm-whoami.md
+++ b/doc/cli/npm-whoami.md
@@ -3,7 +3,7 @@ npm-whoami(1) -- Display npm username
## SYNOPSIS
- npm whoami
+ npm whoami [--registry <registry>]
## DESCRIPTION
diff --git a/lib/adduser.js b/lib/adduser.js
index 3b876f04b..79babe02c 100644
--- a/lib/adduser.js
+++ b/lib/adduser.js
@@ -11,7 +11,7 @@ try {
crypto = process.binding("crypto") && require("crypto")
} catch (ex) {}
-adduser.usage = "npm adduser\nThen enter stuff at the prompts"
+adduser.usage = "npm adduser [--registry=url] [--scope=@orgname] [--always-auth]"
function adduser (args, cb) {
if (!crypto) return cb(new Error(
diff --git a/lib/bin.js b/lib/bin.js
index 5465112d8..62922447b 100644
--- a/lib/bin.js
+++ b/lib/bin.js
@@ -3,7 +3,7 @@ module.exports = bin
var npm = require("./npm.js")
var osenv = require("osenv")
-bin.usage = "npm bin\nnpm bin -g\n(just prints the bin folder)"
+bin.usage = "npm bin [--global]"
function bin (args, silent, cb) {
if (typeof cb !== "function") cb = silent, silent = false
diff --git a/lib/bugs.js b/lib/bugs.js
index c63b76b41..c7f094bf3 100644
--- a/lib/bugs.js
+++ b/lib/bugs.js
@@ -1,6 +1,6 @@
module.exports = bugs
-bugs.usage = "npm bugs <pkgname>"
+bugs.usage = "npm bugs [<pkgname>]"
var npm = require("./npm.js")
, log = require("npmlog")
diff --git a/lib/build.js b/lib/build.js
index 1c683da35..4c284311d 100644
--- a/lib/build.js
+++ b/lib/build.js
@@ -23,7 +23,7 @@ var npm = require("./npm.js")
, writeFile = require("write-file-atomic")
module.exports = build
-build.usage = "npm build <folder>\n(this is plumbing)"
+build.usage = "npm build [<folder>]"
build._didBuild = {}
build._noLC = {}
diff --git a/lib/completion.js b/lib/completion.js
index 1d26ffcf8..7ae7e4742 100644
--- a/lib/completion.js
+++ b/lib/completion.js
@@ -1,9 +1,7 @@
module.exports = completion
-completion.usage = "npm completion >> ~/.bashrc\n"
- + "npm completion >> ~/.zshrc\n"
- + "source <(npm completion)"
+completion.usage = "source <(npm completion)"
var npm = require("./npm.js")
, npmconf = require("./config/core.js")
diff --git a/lib/dedupe.js b/lib/dedupe.js
index a51df149a..fc97ebf36 100644
--- a/lib/dedupe.js
+++ b/lib/dedupe.js
@@ -16,7 +16,7 @@ var log = require('npmlog')
module.exports = dedupe
module.exports.Deduper = Deduper
-dedupe.usage = 'npm dedupe'
+dedupe.usage = 'npm dedupe [package names...]'
function dedupe (args, cb) {
validate('AF', arguments)
diff --git a/lib/docs.js b/lib/docs.js
index 600d393a0..e28fb3e7f 100644
--- a/lib/docs.js
+++ b/lib/docs.js
@@ -1,8 +1,8 @@
module.exports = docs
docs.usage = "npm docs <pkgname>"
-docs.usage += "\n"
-docs.usage += "npm docs ."
+ + "\nnpm docs ."
+
var npm = require("./npm.js")
, opener = require("opener")
diff --git a/lib/edit.js b/lib/edit.js
index ddf501d54..a504b10d1 100644
--- a/lib/edit.js
+++ b/lib/edit.js
@@ -1,8 +1,8 @@
-// npm edit <pkg>[@<version>]
+// npm edit <pkg>
// open the package folder in the $EDITOR
module.exports = edit
-edit.usage = "npm edit <pkg>"
+edit.usage = "npm edit <pkg>[@<version>]"
edit.completion = require("./utils/completion/installed-shallow.js")
diff --git a/lib/explore.js b/lib/explore.js
index 1a40633ab..452be6d72 100644
--- a/lib/explore.js
+++ b/lib/explore.js
@@ -2,7 +2,7 @@
// open a subshell to the package folder.
module.exports = explore
-explore.usage = "npm explore <pkg> [ -- <cmd>]"
+explore.usage = 'npm explore <pkg> [ -- <cmd>]'
explore.completion = require("./utils/completion/installed-shallow.js")
var npm = require("./npm.js")
diff --git a/lib/init.js b/lib/init.js
index ffea8461e..c4fe80735 100644
--- a/lib/init.js
+++ b/lib/init.js
@@ -7,7 +7,7 @@ var log = require("npmlog")
, npm = require("./npm.js")
, initJson = require("init-package-json")
-init.usage = "npm init [--force/-f]"
+init.usage = "npm init [--force|-f|--yes|-y]"
function init (args, cb) {
var dir = process.cwd()
diff --git a/lib/install.js b/lib/install.js
index 3bd86f2b2..dcb497470 100644
--- a/lib/install.js
+++ b/lib/install.js
@@ -15,20 +15,18 @@
module.exports = install
module.exports.Installer = Installer
-install.usage = 'npm install' +
- '\nnpm install <pkg>' +
- '\nnpm install <pkg>@<tag>' +
- '\nnpm install <pkg>@<version>' +
- '\nnpm install <pkg>@<version range>' +
+install.usage = '\nnpm install (with no args, in package dir)' +
+ '\nnpm install [<@scope>/]<pkg>' +
+ '\nnpm install [<@scope>/]<pkg>@<tag>' +
+ '\nnpm install [<@scope>/]<pkg>@<version>' +
+ '\nnpm install [<@scope>/]<pkg>@<version range>' +
'\nnpm install <folder>' +
'\nnpm install <tarball file>' +
'\nnpm install <tarball url>' +
'\nnpm install <git:// url>' +
'\nnpm install <github username>/<github project>' +
- '\n\nCan specify one or more: npm install ./foo.tgz bar@stable /some/folder' +
- '\nIf no argument is supplied and ./npm-shrinkwrap.json is ' +
- '\npresent, installs dependencies specified in the shrinkwrap.' +
- '\nOtherwise, installs dependencies from ./package.json.'
+ '\n\nalias: npm i' +
+ '\ncommon options: [--save|--save-dev|--save-optional] [--save-exact]'
install.completion = function (opts, cb) {
validate('OF', arguments)
diff --git a/lib/link.js b/lib/link.js
index 4c5622aab..7fe244977 100644
--- a/lib/link.js
+++ b/lib/link.js
@@ -14,7 +14,8 @@ var npm = require("./npm.js")
module.exports = link
link.usage = "npm link (in package dir)"
- + "\nnpm link <pkg> (link global into local)"
+ + "\nnpm link [<@scope>/]<pkg>[@<version>]"
+ + "\n\nalias: npm ln"
link.completion = function (opts, cb) {
var dir = npm.globalDir
diff --git a/lib/logout.js b/lib/logout.js
index 64635be4d..90eb13dd6 100644
--- a/lib/logout.js
+++ b/lib/logout.js
@@ -6,7 +6,7 @@ var log = require("npmlog")
var npm = require("./npm.js")
var mapToRegistry = require("./utils/map-to-registry.js")
-logout.usage = "npm logout [--registry] [--scope]"
+logout.usage = "npm logout [--registry=<url>] [--scope=<@scope>]"
function logout (args, cb) {
npm.spinner.start()
diff --git a/lib/ls.js b/lib/ls.js
index 414031ed3..8213bcdc8 100644
--- a/lib/ls.js
+++ b/lib/ls.js
@@ -19,7 +19,8 @@ var npm = require('./npm.js')
var logicalTree = require('./install/logical-tree.js')
var recalculateMetadata = require('./install/deps.js').recalculateMetadata
-ls.usage = 'npm ls'
+ls.usage = "npm ls [[<@scope>/]<pkg> ...]" +
+ "\n\naliases: list, la, ll"
ls.completion = require('./utils/completion/installed-deep.js')
diff --git a/lib/outdated.js b/lib/outdated.js
index 3dcfab69d..8dc4a247d 100644
--- a/lib/outdated.js
+++ b/lib/outdated.js
@@ -16,7 +16,7 @@ packages.
module.exports = outdated
-outdated.usage = 'npm outdated [<pkg> [<pkg> ...]]'
+outdated.usage = "npm outdated [[<@scope>/]<pkg> ...]"
outdated.completion = require('./utils/completion/installed-deep.js')
diff --git a/lib/owner.js b/lib/owner.js
index c9adb7922..43076d877 100644
--- a/lib/owner.js
+++ b/lib/owner.js
@@ -1,8 +1,8 @@
module.exports = owner
-owner.usage = "npm owner add <username> <pkg>"
- + "\nnpm owner rm <username> <pkg>"
- + "\nnpm owner ls <pkg>"
+owner.usage = "npm owner add <user> [<@scope>/]<pkg>"
+ + "\nnpm owner rm <user> [<@scope>/]<pkg>"
+ + "\nnpm owner ls [<@scope>/]<pkg>"
var npm = require("./npm.js")
, log = require("npmlog")
diff --git a/lib/pack.js b/lib/pack.js
index a5ce90094..1ccbd2e88 100644
--- a/lib/pack.js
+++ b/lib/pack.js
@@ -14,7 +14,7 @@ var npm = require("./npm.js")
, writeStream = require('fs-write-stream-atomic')
, cachedPackageRoot = require("./cache/cached-package-root.js")
-pack.usage = "npm pack <pkg>"
+pack.usage = "npm pack [[<@scope>/]<pkg>...]"
// if it can be installed, it can be packed.
pack.completion = install.completion
diff --git a/lib/prefix.js b/lib/prefix.js
index e002edea1..58b2af3a7 100644
--- a/lib/prefix.js
+++ b/lib/prefix.js
@@ -2,7 +2,7 @@ module.exports = prefix
var npm = require("./npm.js")
-prefix.usage = "npm prefix\nnpm prefix -g\n(just prints the prefix folder)"
+prefix.usage = "npm prefix [-g]"
function prefix (args, silent, cb) {
if (typeof cb !== "function") cb = silent, silent = false
diff --git a/lib/prune.js b/lib/prune.js
index edba87601..2f27fdf32 100644
--- a/lib/prune.js
+++ b/lib/prune.js
@@ -2,7 +2,7 @@
module.exports = prune
-prune.usage = "npm prune"
+prune.usage = "npm prune [[<@scope>/]<pkg>...] [--production]"
var readInstalled = require("read-installed")
, npm = require("./npm.js")
diff --git a/lib/publish.js b/lib/publish.js
index 8f1c73c3c..77db8cd43 100644
--- a/lib/publish.js
+++ b/lib/publish.js
@@ -14,8 +14,8 @@ var npm = require("./npm.js")
, semver = require('semver')
, getPublishConfig = require("./utils/get-publish-config.js")
-publish.usage = "npm publish <tarball> [--tag <tagname>]"
- + "\nnpm publish <folder> [--tag <tagname>]"
+publish.usage = "npm publish [<tarball>|<folder>] [--tag <tag>] [--access <public|restricted>]"
+
+ "\n\nPublishes '.' if no argument supplied"
+ "\n\nSets tag `latest` if no --tag specified"
diff --git a/lib/rebuild.js b/lib/rebuild.js
index 70c33e91e..53bd95cff 100644
--- a/lib/rebuild.js
+++ b/lib/rebuild.js
@@ -7,7 +7,7 @@ var readInstalled = require("read-installed")
, npm = require("./npm.js")
, npa = require("npm-package-arg")
-rebuild.usage = "npm rebuild [<name>[@<version>] [name[@<version>] ...]]"
+rebuild.usage = "npm rebuild [[<@scope>/<name>]...]"
rebuild.completion = require("./utils/completion/installed-deep.js")
diff --git a/lib/repo.js b/lib/repo.js
index b6c1b2833..bbafaec3c 100644
--- a/lib/repo.js
+++ b/lib/repo.js
@@ -1,6 +1,6 @@
module.exports = repo
-repo.usage = "npm repo <pkgname>"
+repo.usage = "npm repo [<pkg>]"
var npm = require("./npm.js")
, opener = require("opener")
diff --git a/lib/root.js b/lib/root.js
index b2f731ed5..9310bda92 100644
--- a/lib/root.js
+++ b/lib/root.js
@@ -2,7 +2,7 @@ module.exports = root
var npm = require("./npm.js")
-root.usage = "npm root\nnpm root -g\n(just prints the root folder)"
+root.usage = "npm root [-g]"
function root (args, silent, cb) {
if (typeof cb !== "function") cb = silent, silent = false
diff --git a/lib/run-script.js b/lib/run-script.js
index 057af2bc6..2ca30d0e8 100644
--- a/lib/run-script.js
+++ b/lib/run-script.js
@@ -7,7 +7,8 @@ var lifecycle = require("./utils/lifecycle.js")
, log = require("npmlog")
, chain = require("slide").chain
-runScript.usage = "npm run-script <command> [-- <args>]"
+runScript.usage = "npm run-script <command> [-- <args>...]"
+ + "\n\nalias: npm run"
runScript.completion = function (opts, cb) {
diff --git a/lib/search.js b/lib/search.js
index 840bc2f6b..6dc1c027e 100644
--- a/lib/search.js
+++ b/lib/search.js
@@ -5,7 +5,8 @@ var npm = require("./npm.js")
, columnify = require("columnify")
, updateIndex = require("./cache/update-index.js")
-search.usage = "npm search [some search terms ...]"
+search.usage = "npm search [--long] [search terms ...]"
+ + "\n\naliases: s, se"
search.completion = function (opts, cb) {
var compl = {}
diff --git a/lib/star.js b/lib/star.js
index 1f324336c..b6fc49326 100644
--- a/lib/star.js
+++ b/lib/star.js
@@ -6,8 +6,8 @@ var npm = require("./npm.js")
, asyncMap = require("slide").asyncMap
, mapToRegistry = require("./utils/map-to-registry.js")
-star.usage = "npm star <package> [pkg, pkg, ...]\n"
- + "npm unstar <package> [pkg, pkg, ...]"
+star.usage = "npm star [<pkg>...]\n"
+ + "npm unstar [<pkg>...]"
star.completion = function (opts, cb) {
// FIXME: there used to be registry completion here, but it stopped making
diff --git a/lib/stars.js b/lib/stars.js
index 01ec76e42..e8cb23fb4 100644
--- a/lib/stars.js
+++ b/lib/stars.js
@@ -1,6 +1,6 @@
module.exports = stars
-stars.usage = "npm stars [username]"
+gstars.usage = "npm stars [<user>]"
var npm = require("./npm.js")
, log = require("npmlog")
diff --git a/lib/tag.js b/lib/tag.js
index 75da0b217..24d54676a 100644
--- a/lib/tag.js
+++ b/lib/tag.js
@@ -1,7 +1,8 @@
// turns out tagging isn't very complicated
// all the smarts are in the couch.
module.exports = tag
-tag.usage = "npm tag <project>@<version> [<tag>]"
+tag.usage = "[DEPRECATED] npm tag <name>@<version> [<tag>]"
+ + "\nSee `dist-tag`"
tag.completion = require("./unpublish.js").completion
diff --git a/lib/uninstall.js b/lib/uninstall.js
index 500a73242..3106b12e7 100644
--- a/lib/uninstall.js
+++ b/lib/uninstall.js
@@ -4,8 +4,8 @@
module.exports = uninstall
module.exports.Uninstaller = Uninstaller
-uninstall.usage = 'npm uninstall <name>[@<version> [<name>[@<version>] ...]' +
- '\nnpm rm <name>[@<version> [<name>[@<version>] ...]'
+uninstall.usage = 'npm uninstall [<@scope>/]<pkg>[@<version>]... [--save|--save-dev|--save-optional]' +
+ '\n\naliases: remove, rm, r, un, unlink'
var util = require('util')
var path = require('path')
diff --git a/lib/unpublish.js b/lib/unpublish.js
index 111f27aa2..c692730a9 100644
--- a/lib/unpublish.js
+++ b/lib/unpublish.js
@@ -9,7 +9,7 @@ var mapToRegistry = require("./utils/map-to-registry.js")
var npa = require("npm-package-arg")
var getPublishConfig = require("./utils/get-publish-config.js")
-unpublish.usage = "npm unpublish <project>[@<version>]"
+unpublish.usage = "npm unpublish [<@scope>/]<pkg>[@<version>]"
unpublish.completion = function (opts, cb) {
if (opts.conf.argv.remain.length >= 3) return cb()
diff --git a/lib/update.js b/lib/update.js
index ead9945ed..1d487a6e4 100644
--- a/lib/update.js
+++ b/lib/update.js
@@ -1,6 +1,6 @@
module.exports = update
-update.usage = 'npm update [pkg]'
+update.usage = 'npm update [-g] [<pkg>...]'
var url = require('url')
var log = require('npmlog')
diff --git a/lib/version.js b/lib/version.js
index f763aad0a..08b276c37 100644
--- a/lib/version.js
+++ b/lib/version.js
@@ -13,7 +13,7 @@ var semver = require("semver")
, assert = require("assert")
, lifecycle = require("./utils/lifecycle.js")
-version.usage = "npm version [<newversion> | major | minor | patch | prerelease | preminor | premajor ]\n"
+version.usage = "npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease]"
+ "\n(run in package dir)\n"
+ "'npm -v' or 'npm --version' to print npm version "
+ "("+npm.version+")\n"
diff --git a/lib/view.js b/lib/view.js
index 9199d352a..45815455b 100644
--- a/lib/view.js
+++ b/lib/view.js
@@ -1,7 +1,8 @@
// npm view [pkg [pkg ...]]
module.exports = view
-view.usage = "npm view pkg[@version] [<field>[.subfield]...]"
+view.usage = "npm view [<@scope>/]<pkg>[@<version>] [<field>[.subfield]...]"
+ + "\n\naliases: info, show, v"
var npm = require("./npm.js")
, readJson = require("read-package-json")
diff --git a/lib/whoami.js b/lib/whoami.js
index d92a6574a..a3f83cf45 100644
--- a/lib/whoami.js
+++ b/lib/whoami.js
@@ -2,7 +2,7 @@ var npm = require("./npm.js")
module.exports = whoami
-whoami.usage = "npm whoami\n(just prints username according to given registry)"
+whoami.usage = "npm whoami [--registry <registry>]\n(just prints username according to given registry)"
function whoami (args, silent, cb) {
// FIXME: need tighter checking on this, but is a breaking change