NPM-EDIT(1)

πŸ’… NPM-EDIT(1) πŸ’…

okay so this is the npm-edit page from the npm manual, bestie β€” yes, the whole man page is literally called NPM-EDIT(1), that's just how man pages do. sit down, hydrate, and let me tell you about the one npm command that opens a text editor like it's 1998 in the best way possible 🫢


✨ NAME ✨

npm-edit β€” edit an installed package πŸ“

no cap, that's the whole name section. it's giving minimalism.


πŸ¦‹ SYNOPSIS πŸ¦‹

npm edit <pkg>[/<subpkg>...]

that's it, that's the whole vibe. <pkg> is the package, and you can keep chaining / + <subpkg> as many times as your little heart desires 🌸

🚨 real talk: this command is unaware of workspaces. like, it literally does not know they exist. not me being dramatic, that's just what the page says.

πŸŽ€ DESCRIPTION πŸŽ€

so here's the tea β˜• β€” npm edit picks a dependency in your current project and then opens that package folder in your default editor. and by "default editor" I mean whatever you've configured as the npm editor config β€” go peek at npm-config ⟨npm-config⟩ if you wanna know more about that ✨

then, the genuinely iconic part: after you've edited it, the package gets rebuilt so it picks up any changes in compiled packages. like it knows you touched stuff. it's respectful like that πŸ’–

fr fr, here's the classic use case β€” you run:

npm install connect

to install connect into your package, and then:

npm edit connect

to make a few little changes to your locally installed copy. main character energy honestly πŸ‘‘


πŸ“ CONFIGURATION πŸ“

πŸ’« editor πŸ’«

  • Default: The EDITOR or VISUAL environment variables, or '%SYSTEMROOT%\notepad.exe' on Windows, or 'vi' on Unix systems 🌈
  • Type: String

this is the command that gets run for npm edit and npm config edit. that's it. that's the whole config. lowkey obsessed with how simple that is 🧚


🌟 SEE ALSO 🌟

  • npm help folders πŸ“
  • npm help explore πŸ”
  • npm help install πŸ“¦
  • npm help config βš™οΈ
  • npm help npmrc πŸ“œ

and that's the whole page, bestie!! go forth and edit your node_modules responsibly πŸ’œ this was NPM@12.2.1, dated October 2026, and yes the footer still insists on shouting NPM-EDIT(1) at you one last time. slay, periodt, bye πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from