microsoft / microsoft/winget-cli

It is difficult to get the app I want if they have the same / similar names.

Open
#301 10 comments 17 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description of the feature / enhancement

When a query matches more than one package, winget install (and upgrade / uninstall / show) prints "Multiple packages found matching input criteria. Please refine the input." and exits. The user then has to re-read the table, copy an exact Id or Name, add --id/--exact, and run the command again.

This is a frequent friction point when package names are subsets or near-duplicates of one another — for example Microsoft.PowerShell vs Microsoft.PowerShell-Preview, a stable vs a pre-release entry, x86 vs x64, or the same package present in more than one source.

Problem
  • -e/--exact and --id resolve it but are not discoverable, and even an "exact" query can still return multiple rows (pre-release variants, multiple sources).
  • There is no way to pick from the list that was just displayed — the command errors and exits.
Proposed behavior
  1. Interactive numbered selection. When multiple packages match, present a numbered list and prompt the user to choose (apt/yay-style):
    Multiple packages matched your query. Select one:
      [1] Windows Terminal          Microsoft.WindowsTerminal
      [2] Windows Terminal Preview  Microsoft.WindowsTerminal.Preview
    
    Honor --disable-interactivity (and non-interactive contexts) by keeping today's refine-and-exit behavior for scripts.
  2. Auto-select on an unambiguous exact match. If exactly one candidate exactly matches the provided Id, Name, or Moniker, proceed without prompting.
  3. Clearer non-interactive guidance. When interactivity is disabled, the "refine" message should show the precise --id … --exact (and --source when the ambiguity is cross-source) needed to disambiguate.
Scope

Scoped to the UX of choosing among legitimately-multiple matches. Incorrect matching/correlation (the engine selecting the wrong package, or ARP correlation issues) is tracked separately.

Consolidates #419, #1620, #1830.

Related
  • #3847
  • #840
  • #4935
  • #1951

Updated with GitHub Copilot.

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

No files or tests are named. Start by tracing the multiple-match handling used by install, upgrade, uninstall, and show, then inspect the interactive and --disable-interactivity paths. Done means interactive selection, exact-match auto-selection, and precise non-interactive guidance are covered without changing incorrect-match 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
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.