microsoft / microsoft/winget-cli

Add short command aliases to improve user experience and efficiency

Open
#4,775 6 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-User-Interface Issue-Feature
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

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:

  1. Reduce typing effort for frequent users
  2. Improve command memorability
  3. Align winget more closely with other popular CLI tools that offer similar shortcuts
  4. Maintain full backward compatibility with existing long-form commands

Proposed alias examples:

  • winget -> wg
  • install -> i
  • search -> s
  • list -> l
  • upgrade -> u
  • uninstall -> rm
Proposed technical implementation details
  1. Implement an alias mapping system that translates short commands to their full equivalents.
  2. Add a configuration file (e.g., winget-aliases.json) where users can define custom aliases.
  3. Modify the command parser to check for aliases before processing the full command.
  4. Update the help documentation to include information about aliases and how to use them.
  5. Optionally, add a new command like winget alias to 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the command parser, then review how help documentation is organized. Define the supported aliases, how custom aliases in a configuration file would work, and whether a winget alias command is included. Done means abbreviated main commands and subcommands work while existing long-form commands remain compatible and the help text documents the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.