Add short command aliases to improve user experience and efficiency
Description of the new feature / enhancement
I propose adding short command aliases to winget-cli to enhance user experience and improve efficiency for frequent users. This feature would allow users to execute common winget commands using abbreviated versions of both the main command and its subcommands.
Currently, users need to type out full commands like:
winget install -e --id Git.Git
With the proposed feature, users could instead use shorter aliases like:
wg i -e --id Git.Git
This enhancement would:
- Reduce typing effort for frequent users
- Improve command memorability
- Align winget more closely with other popular CLI tools that offer similar shortcuts
- Maintain full backward compatibility with existing long-form commands
Proposed alias examples:
winget->wginstall->isearch->slist->lupgrade->uuninstall->rm
Proposed technical implementation details
- Implement an alias mapping system that translates short commands to their full equivalents.
- Add a configuration file (e.g.,
winget-aliases.json) where users can define custom aliases. - Modify the command parser to check for aliases before processing the full command.
- Update the help documentation to include information about aliases and how to use them.
- Optionally, add a new command like
winget aliasto manage custom aliases directly from the CLI.
This feature would make winget more user-friendly while maintaining its current functionality and compatibility. It would be particularly beneficial for power users and those who frequently use winget in scripts or daily workflows.
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Open similar issues:
- Add aliases to the cmdlets in Microsoft.Winget.Client PowerShell module (#4411), similarity score: 0.76
Closed similar issues:
- Add aliases for installation and uninstallation (#2303), similarity score: 0.80
- Command aliases (#380), similarity score: 0.76
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
winget -> wg install -> i search -> s list -> l upgrade -> u uninstall -> rm
Some of these are already taken:
-a,--architecture- Select the architecture-e,--exact- Find package using exact match-h,--silent- Request silent installation-i,--interactive- Request interactive installation; user input may be needed-l,--location- Location to install to (if supported)-o,--log- Log location (if supported)-r,--rename- The value to rename the executable file (portable)-s,--source- Find package using the specified source-v,--version- Use the specified version; default is the latest version
uninstall -> rm
This one already exists. winget <command> --help would show you all aliases available, but most of them aren't short like rm
The primary command "winget" isn't something we would likely shorten in the "CLI", but the PowerShell Module can have shorter aliases for cmdlets.
The auto-completion feature can also save typing in the CLI, and PowerShell already has a notion of this.
There do already exist short aliases for some of these, as @mdanish-kh mentioned. Specifically,
- install => add
- list => ls
- uninstall => rm
The one character aliases could be very confusing to new users - i could be for import or install; s could be for show, search, source, or settings