npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

Shorthand for installing multiple packages from a @scope

Normally you’d do this to install multiple package from the same org:

npm i --save @scope/lib1 @scope/lib2 @scope/lib3 @scope/lib4

It would be nice to have a shorthand version:

npm i --save @scope/lib1,lib2,lib3,lib4

What do you think?


Can’t you already do this in modern shells with something like: npm i @scope/{lib1,lib2,lib3}? :thinking:

p.s. just a reminder that you don’t need --save as of npm5


Just tested the brace expansion, and it works really well. For example: npm i --no-save @babel/{core,preset-env,plugin-proposal-nullish-coalescing-operator} to install babel, the env preset, and a plugin.


@zkat didn’t know that. tried with iTerm on Mac and it works.
Thanks.