Skip to content

feat: add u as alias for update command#9163

Open
Ausoj wants to merge 1 commit intonpm:latestfrom
Ausoj:feat/add-u-alias-for-update
Open

feat: add u as alias for update command#9163
Ausoj wants to merge 1 commit intonpm:latestfrom
Ausoj:feat/add-u-alias-for-update

Conversation

@Ausoj
Copy link
Copy Markdown

@Ausoj Ausoj commented Mar 30, 2026

Summary

Adds u as a short alias for the update command, making it consistent with i for install.

Motivation

npm i is the canonical short form for npm install — the most commonly used npm command. However, npm update lacks an equivalent single-character alias. The existing npm up alias works, but feels inconsistent compared to i.

Adding u makes the CLI more ergonomic and intuitive:

npm i    # install   ✅ already exists
npm u    # update    ✅ this PR

Changes

  • Added u: 'update' alias in lib/utils/cmd-list.js, grouped alongside the existing up: 'update' alias

Notes

  • u is not currently used by any other alias or command, so there is no conflict
  • Follows the same pattern as other single-character aliases (i, r, t, c, s, v, x)

@Ausoj Ausoj requested a review from a team as a code owner March 30, 2026 11:46
@Ausoj Ausoj force-pushed the feat/add-u-alias-for-update branch from 14c8a21 to 8bce7f3 Compare March 30, 2026 11:50
@ItsAMirko
Copy link
Copy Markdown

I would love that. Always running in the same problem and would really like to have that additional shortcut.

@arnemileswinter
Copy link
Copy Markdown

second this, a mitigation to RSI as well.

@owlstronaut
Copy link
Copy Markdown
Contributor

I'm not sure about this. My brain tells me npm u means uninstall. I don't think the u is unambiguous enough to add it here. I find the existing r equally misleading, but we're already here.

@KevinExtremo
Copy link
Copy Markdown

I think this is a great idea! I love using the shorthands.

I also do not believe that the argument about u standing for uninstall to be a counter. Uninstall is a destructive action while the other shorthands are constructive actions.

I understand one could argue that an update can change contracts but to me its not the same as a full on removal.

So in that sense I am actually happy that uninstall does not come with a shorthand.

@larsmenzel
Copy link
Copy Markdown

Actually a regular thing I run into. Seems like a neat addition which wouldn't hurt to add :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants