npm-config.1 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. .TH "NPM\-CONFIG" "1" "August 2021" "" ""
  2. .SH "NAME"
  3. \fBnpm-config\fR \- Manage the npm configuration files
  4. .SS Synopsis
  5. .P
  6. .RS 2
  7. .nf
  8. npm config set <key> <value> [\-g|\-\-global]
  9. npm config get <key>
  10. npm config delete <key>
  11. npm config list [\-l] [\-\-json]
  12. npm config edit
  13. npm get <key>
  14. npm set <key> <value> [\-g|\-\-global]
  15. aliases: c
  16. .fi
  17. .RE
  18. .SS Description
  19. .P
  20. npm gets its config settings from the command line, environment
  21. variables, \fBnpmrc\fP files, and in some cases, the \fBpackage\.json\fP file\.
  22. .P
  23. See npm help npmrc for more information about the npmrc files\.
  24. .P
  25. See npm help config for a more thorough discussion of the mechanisms
  26. involved\.
  27. .P
  28. The \fBnpm config\fP command can be used to update and edit the contents
  29. of the user and global npmrc files\.
  30. .SS Sub\-commands
  31. .P
  32. Config supports the following sub\-commands:
  33. .SS set
  34. .P
  35. .RS 2
  36. .nf
  37. npm config set key value
  38. .fi
  39. .RE
  40. .P
  41. Sets the config key to the value\.
  42. .P
  43. If value is omitted, then it sets it to "true"\.
  44. .SS get
  45. .P
  46. .RS 2
  47. .nf
  48. npm config get key
  49. .fi
  50. .RE
  51. .P
  52. Echo the config value to stdout\.
  53. .SS list
  54. .P
  55. .RS 2
  56. .nf
  57. npm config list
  58. .fi
  59. .RE
  60. .P
  61. Show all the config settings\. Use \fB\-l\fP to also show defaults\. Use \fB\-\-json\fP
  62. to show the settings in json format\.
  63. .SS delete
  64. .P
  65. .RS 2
  66. .nf
  67. npm config delete key
  68. .fi
  69. .RE
  70. .P
  71. Deletes the key from all configuration files\.
  72. .SS edit
  73. .P
  74. .RS 2
  75. .nf
  76. npm config edit
  77. .fi
  78. .RE
  79. .P
  80. Opens the config file in an editor\. Use the \fB\-\-global\fP flag to edit the
  81. global config\.
  82. .SS See Also
  83. .RS 0
  84. .IP \(bu 2
  85. npm help folders
  86. .IP \(bu 2
  87. npm help config
  88. .IP \(bu 2
  89. npm help package\.json
  90. .IP \(bu 2
  91. npm help npmrc
  92. .IP \(bu 2
  93. npm help npm
  94. .RE