1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-15 14:15:51 +02:00
tldr/pages/common/npm-config.md

33 lines
673 B
Markdown
Raw Normal View History

# npm config
2025-03-17 12:18:14 +01:00
> Manage the `npm` configuration settings.
> More information: <https://docs.npmjs.com/cli/npm-config>.
2025-03-17 12:18:14 +01:00
- Show all configuration settings:
`npm {{[c|config]}} list`
2025-03-17 12:18:14 +01:00
- List all configuration settings as `JSON`:
`npm {{[c|config]}} list --json`
2025-03-17 12:18:14 +01:00
- Get the value of a specific configuration key:
`npm {{[c|config]}} get {{key}}`
2025-03-17 12:18:14 +01:00
- Set a configuration key to a specific value:
`npm {{[c|config]}} set {{key}} {{value}}`
2025-03-17 12:18:14 +01:00
- Delete a configuration key:
`npm {{[c|config]}} delete {{key}}`
2025-03-17 12:18:14 +01:00
- Edit the global npm configuration file in the default editor:
`npm {{[c|config]}} edit`
2025-03-17 12:18:14 +01:00
- Attempt to repair invalid configuration items:
`npm {{[c|config]}} fix`