1--- 2section: cli-commands 3title: npm-pack 4description: Create a tarball from a package 5--- 6 7# npm-pack(1) 8 9## Create a tarball from a package 10 11### Synopsis 12 13```bash 14npm pack [[<@scope>/]<pkg>...] [--dry-run] 15``` 16 17### Description 18 19For anything that's installable (that is, a package folder, tarball, 20tarball url, name@tag, name@version, name, or scoped name), this 21command will fetch it to the cache, and then copy the tarball to the 22current working directory as `<name>-<version>.tgz`, and then write 23the filenames out to stdout. 24 25If the same package is specified multiple times, then the file will be 26overwritten the second time. 27 28If no arguments are supplied, then npm packs the current package folder. 29 30The `--dry-run` argument will do everything that pack usually does without 31actually packing anything. Reports on what would have gone into the tarball. 32 33### See Also 34 35* [npm cache](/cli-commands/npm-cache) 36* [npm publish](/cli-commands/npm-publish) 37* [npm config](/cli-commands/npm-config) 38* [npmrc](/configuring-npm/npmrc) 39