microsoft / microsoft/winget-cli
Day 0 Update: Self-update on first command when client is outdated
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Relevant area(s)
WinGet CLI
Description of the new feature / enhancement
Day 0 Update — When the first command requiring the source index is executed (e.g., winget install, winget upgrade, winget search, or winget configure), WinGet should check whether a newer stable version of the client is available and prompt the user to update before proceeding.
This addresses several chicken-and-egg problems:
- A user installs WinGet (or gets it via Windows) but the version is already outdated by the time they first use it.
- New features (e.g.,
winget configure) require a recent client, but users don't know they need to update first. - The
winget configure enablestep should be unnecessary if the first command executed iswinget configureon a client that supports it natively — but today users hit "unrecognized command" errors because their client is too old.
Proposed behavior:
- The preIndexed package source includes metadata indicating the "latest stable" client version.
- On first command execution requiring the index, WinGet compares its own version against the advertised latest.
- If outdated, WinGet informs the user in the current terminal window that an update is needed.
- WinGet shuts down, updates itself, then relaunches in a new window with the original command (using
--waitso the new window doesn't close immediately). - The user sees their original command execute on the updated client.
This eliminates the "install WinGet, then immediately need to update WinGet" friction and removes barriers to new functionality adoption.
Proposed technical implementation details
- Add a
latestStableVersionfield to the preIndexed package source metadata. - Client version comparison on first index access per session.
- Self-update flow: notify user → close current process → trigger update (via Microsoft Store or direct package) → relaunch with original arguments +
--wait. - Group Policy controls:
EnableDay0Update(toggle),Day0UpdateSource(Store vs. direct). - Settings:
day0Update.enabled,day0Update.dismissCount(allow N dismissals before suppressing).
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
Start with the preIndexed package source metadata and the first index access path for commands such as winget install, upgrade, search, and configure. Trace the proposed version comparison, update source and policy/settings controls; done means an outdated client informs the user, updates, relaunches with the original arguments and --wait, and executes the command.
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
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100