1 ---
2 title: npm-pack
3 section: 1
4 description: Create a tarball from a package
5 github_repo: npm/cli
6 github_branch: release/v6
7 github_path: docs/content/commands/npm-pack.md
8 redirect_from:
9 - /cli-documentation/v6/cli-commands/npm-pack
10 - /cli-documentation/v6/cli-commands/pack
11 - /cli-documentation/v6/commands/npm-pack
12 - /cli-documentation/v6/commands/pack
13 - /cli-documentation/v6/npm-pack
14 - /cli-documentation/v6/pack
15 - /cli/v6/cli-commands/npm-pack
16 - /cli/v6/cli-commands/pack
17 - /cli/v6/commands/pack
18 - /cli/v6/npm-pack
19 - /cli/v6/pack
20 ---
21
22 ### Synopsis
23
24 ```bash
25 npm pack [[<@scope>/]<pkg>...] [--dry-run]
26 ```
27
28 ### Description
29
30 For anything that's installable (that is, a package folder, tarball, 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.
31
32 If the same package is specified multiple times, then the file will be overwritten the second time.
33
34 If no arguments are supplied, then npm packs the current package folder.
35
36 The `--dry-run` argument will do everything that pack usually does without actually packing anything. Reports on what would have gone into the tarball.
37
38 ### See Also
39
40 - [npm cache](/cli/v6/commands/npm-cache)
41 - [npm publish](/cli/v6/commands/npm-publish)
42 - [npm config](/cli/v6/commands/npm-config)
43 - [npmrc](/cli/v6/configuring-npm/npmrc)