1--- 2title: npm-edit 3section: 1 4description: Edit an installed package 5--- 6 7### Synopsis 8 9```bash 10npm edit <pkg>[/<subpkg>...] 11``` 12 13Note: This command is unaware of workspaces. 14 15### Description 16 17Selects a dependency in the current project and opens the package folder in 18the default editor (or whatever you've configured as the npm `editor` 19config -- see [`npm-config`](npm-config).) 20 21After it has been edited, the package is rebuilt so as to pick up any 22changes in compiled packages. 23 24For instance, you can do `npm install connect` to install connect 25into your package, and then `npm edit connect` to make a few 26changes to your locally installed copy. 27 28### Configuration 29 30#### `editor` 31 32* Default: The EDITOR or VISUAL environment variables, or 33 '%SYSTEMROOT%\notepad.exe' on Windows, or 'vi' on Unix systems 34* Type: String 35 36The command to run for `npm edit` and `npm config edit`. 37 38 39 40### See Also 41 42* [npm folders](/configuring-npm/folders) 43* [npm explore](/commands/npm-explore) 44* [npm install](/commands/npm-install) 45* [npm config](/commands/npm-config) 46* [npmrc](/configuring-npm/npmrc) 47