1NPM-CONFIG(1) NPM-CONFIG(1)
2
3
4
6 npm-config - Manage the npm configuration files
7
8 Synopsis
9 npm config set <key> <value> [-g|--global]
10 npm config get <key>
11 npm config delete <key>
12 npm config list [-l] [--json]
13 npm config edit
14 npm get <key>
15 npm set <key> <value> [-g|--global]
16
17 aliases: c
18
19 Description
20 npm gets its config settings from the command line, environment vari‐
21 ables, npmrc files, and in some cases, the package.json file.
22
23 See npm help npmrc for more information about the npmrc files.
24
25 See npm help config for a more thorough discussion of the mechanisms
26 involved.
27
28 The npm config command can be used to update and edit the contents of
29 the user and global npmrc files.
30
31 Sub-commands
32 Config supports the following sub-commands:
33
34 set
35 npm config set key value
36
37 Sets the config key to the value.
38
39 If value is omitted, then it sets it to "true".
40
41 get
42 npm config get key
43
44 Echo the config value to stdout.
45
46 list
47 npm config list
48
49 Show all the config settings. Use -l to also show defaults. Use --json
50 to show the settings in json format.
51
52 delete
53 npm config delete key
54
55 Deletes the key from all configuration files.
56
57 edit
58 npm config edit
59
60 Opens the config file in an editor. Use the --global flag to edit the
61 global config.
62
63 See Also
64 • npm help folders
65
66 • npm help config
67
68 • npm help package.json
69
70 • npm help npmrc
71
72 • npm help npm
73
74
75
76
77 April 2021 NPM-CONFIG(1)