microsoft / microsoft/winget-cli
It is difficult to get the app I want if they have the same / similar names.
Nobody has claimed this yet.
- 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/--exactand--idresolve 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
- Interactive numbered selection. When multiple packages match, present a numbered list and prompt the user to choose (apt/yay-style):
HonorMultiple packages matched your query. Select one: [1] Windows Terminal Microsoft.WindowsTerminal [2] Windows Terminal Preview Microsoft.WindowsTerminal.Preview--disable-interactivity(and non-interactive contexts) by keeping today's refine-and-exit behavior for scripts. - Auto-select on an unambiguous exact match. If exactly one candidate exactly matches the provided
Id,Name, orMoniker, proceed without prompting. - Clearer non-interactive guidance. When interactivity is disabled, the "refine" message should show the precise
--id … --exact(and--sourcewhen 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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