Skip to content

Conversation

@hcoona
Copy link

@hcoona hcoona commented Oct 21, 2025

Winget Completions Update Summary

Overview

Successfully updated the winget-completions.nu file for Windows Package Manager v1.11.510.

Changes Made

1. Gathered Complete Documentation

  • Collected help information for all winget commands and subcommands
  • Stored in winget-help-dumps/ folder for future reference
  • Reviewed current NuShell custom completions documentation

2. Major Updates

New Commands Added

  • winget pin - Manage package pins (with subcommands: add, remove, list, reset)
  • winget download - Downloads the installer from a given package
  • winget configure - Configures the system into a desired state (mentioned but not fully implemented)
  • winget repair - Repairs the selected package (mentioned but not fully implemented)
  • winget dscv3 - DSC v3 resource commands (mentioned but not fully implemented)

Enhanced Existing Commands

All commands now include the full set of global options:

  • --wait - Prompts before exiting
  • --logs / --open-logs - Open logs location
  • --verbose / --verbose-logs - Enable verbose logging
  • --nowarn / --ignore-warnings - Suppress warnings
  • --disable-interactivity - Disable interactive prompts
  • --proxy - Set proxy for execution
  • --no-proxy - Disable proxy for execution

New Options in Install/Upgrade Commands

  • --architecture (-a) - Select architecture
  • --installer-type - Select installer type
  • --custom - Additional arguments for installer
  • --ignore-security-hash - Ignore hash check failures
  • --allow-reboot - Allow system reboots
  • --skip-dependencies - Skip dependency processing
  • --ignore-local-archive-malware-scan - Ignore malware scans
  • --dependency-source - Source for dependencies
  • --no-upgrade - Skip upgrades if already installed
  • --authentication-mode - Authentication preference
  • --authentication-account - Account for authentication
  • --rename (-r) - Rename executable (portable)
  • --uninstall-previous - Uninstall old version during upgrade

Enhanced List/Search Commands

  • --cmd / --command - Filter by command
  • --upgrade-available - Show only upgradable packages
  • --unknown / --include-unknown - Include packages with unknown versions
  • --pinned / --include-pinned - Include pinned packages
  • --versions - Show available versions

Enhanced Uninstall Command

  • --product-code - Filter by product code
  • --all / --all-versions - Uninstall all versions
  • --purge - Delete all package files
  • --preserve - Retain created files

Source Management Updates

  • Added --trust-level option for source add
  • Added --explicit flag for source add

3. Improved Completion Functions

Updated Completers

  • nu-complete winget sources - Lists available package sources
  • nu-complete winget scope - user/machine scope options
  • nu-complete winget locale - BCP47 locale codes
  • nu-complete winget architecture - x86, x64, arm, arm64, neutral
  • nu-complete winget installer-type - All installer types
  • nu-complete winget authentication-mode - silent, silentPreferred, interactive
  • nu-complete winget source-type - Microsoft.PreIndexed.Package, Microsoft.Rest
  • nu-complete winget trust-level - none, trusted

New Completers

  • nu-complete winget installed packages - Caches installed packages for uninstall completions

4. Syntax Improvements

  • Updated to use modern NuShell syntax
  • Proper use of @ for attaching completers to type annotations
  • Consistent parameter naming and descriptions
  • Added all command aliases (e.g., winget add, winget view, winget find, etc.)

5. Documentation

  • All parameters now have clear, concise descriptions
  • Maintained consistency with official winget help text
  • Added comments for better code organization

6. Structured Output Restored

  • Reintroduced structured wrappers for winget source list, winget search, and winget list so they once again return Nu tables by default
  • Added a --raw escape hatch on each wrapper to expose the unparsed CLI output when desired
  • Restored nu-complete winget flagify, nu-complete winget trimLoadingSymbol, and the winget upgrades helper to support the parsing workflow

Testing

  • ✅ File syntax validated with NuShell
  • ✅ Commands properly export
  • ✅ Completions load without errors

Breaking Changes

None. Legacy structured output helpers have been restored; use the new --raw switch on each wrapper if you prefer the original CLI text.

Recent Improvements (Based on Cargo/Eza Completions)

Code Quality Enhancements

  1. Enhanced Documentation

    • Added detailed header comment describing winget's purpose
    • Included winget version (v1.11.510) in the header
    • Added @category package-manager annotations to all main commands
    • Added @example annotations with practical use cases for key commands:
      • winget install - 3 examples (by name, specific version, silent install)
      • winget show - 2 examples (package info, available versions)
      • winget search - 2 examples (basic search, exact ID search)
      • winget list - 3 examples (all packages, upgrades, by source)
      • winget upgrade - 3 examples (show upgrades, upgrade all, specific package)
      • winget uninstall - 2 examples (by name, by ID)
  2. Improved Completion Functions

    • All completion functions maintain simple, clean list format
    • Proper caching for expensive operations (installed packages)
    • Efficient parsing of winget output
  3. Better Code Organization

    • More descriptive multi-line comments for complex commands
    • Consistent formatting across all extern declarations
    • Clearer separation between completion functions and command definitions

Notes

  • Some commands (configure, repair, dscv3) were mentioned in help but not fully documented - basic extern declarations can be added if needed
  • The file is now fully compatible with winget v1.11.510
  • All global options are consistently available across all commands
  • Completion functions use caching where appropriate to improve performance
  • Commands expose extern signatures for completions, while winget source list, winget search, and winget list layer defs on top to provide structured table output by default

@fdncred
Copy link
Contributor

fdncred commented Oct 21, 2025

  1. This is so much text it makes me think it's all AI generated, which I'm not a super fan of unless there is a lot of human involvement and testing.
  2. Now uses extern declaration, returns raw winget CLI output

I'm not a fan of having raw winget cli output. This is supposed to be a nushell script. if detect columns works great, as indicated in all this text, then it should be used to format the output in nushell tables.

@hcoona
Copy link
Author

hcoona commented Oct 21, 2025

Hi @fdncred,

Thanks a lot for the feedback! I really appreciate you taking the time to review this in detail.

  1. This is so much text it makes me think it's all AI generated, which I'm not a super fan of unless there is a lot of human involvement and testing.

I completely understand your concern. AI-generated code can sometimes miss the intention or lack quality, especially without sufficient human review. I admit that this PR was initially generated by AI, but I manually verified it by comparing the previous and current implementations. In this case, it was a very clear and well-defined change, so it was easy for AI to understand my intention: mapping help messages to completions.

I’ve tested the new version on two of my own PCs, and in my main usage scenarios (such as list --update-available, upgrade, and search), it has worked reliably so far.

I hope this helps address your concern.

  1. Now uses extern declaration, returns raw winget CLI output

I'm not a fan of having raw winget cli output. This is supposed to be a nushell script. if detect columns works great, as indicated in all this text, then it should be used to format the output in nushell tables.

I agree that ideally, the output should be nicely formatted in Nushell tables. However, parsing raw winget CLI output is extremely difficult because it’s not machine-readable: the separators are inconsistent, and some cells may be empty, which breaks any structured parsing logic or makes it too complex.

Microsoft’s PowerShell implementation faced the same issue. They avoid parsing the CLI output either. Their solution was to bypass the CLI entirely and instead call the underlying COM/WinRT interface directly.

Given that limitation, I believe returning the raw CLI output is currently the most pragmatic and maintainable approach. If winget ever provides a structured output format in the future (e.g., JSON or XML), I’d be happy to revisit this and add proper Nushell formatting then.

Thanks again for the constructive discussion!

image image

@hcoona
Copy link
Author

hcoona commented Oct 29, 2025

@fdncred kindly ping for your feedback.

@fdncred
Copy link
Contributor

fdncred commented Oct 29, 2025

I understand your points about winget not supporting a structured output format, shame on them. But I'm not inclined to land a version of this that removes the nushell tables. Seems like regex could be used here to make the tables or maybe there's some other way based on how powershell does it?

@hcoona
Copy link
Author

hcoona commented Oct 30, 2025

Hi @fdncred,

Thanks for clarifying — I see the core issue now is whether this completion should keep parsing into Nushell tables. Let me show you why I was hesitant to say “let’s just regex it,” using the exact output shape from the screenshot I tested with.

image

The data itself looks like a table, but it’s only visually aligned. In the screenshot the gaps between columns aren’t consistent. On the line with Microsoft Azure Storage Explorer version 1.39.1 there’s only 1 space between the name and the id. On the line with Visual Studio Enterprise 2022 there’s only 1 space between the id and the version. So we can’t rely on “2+ spaces = new column”.

Some rows contain values that “look like” other columns. The name Microsoft Azure Storage Explorer version 1.39.1 already includes something that looks like a version, but it’s part of the name, not the Version column.

Some Version cells are not “plain versions”. On the Visual Studio Enterprise 2022 line the Version value is < 17.14.18, so we have to handle symbols and extra spacing, not just x.y.z.

And all of this can change with terminal width.

Because of all that, my takeaway is: we can write a regex that works on this screenshot, but we can’t write a simple, stable regex that works on “arbitrary winget output on arbitrary user machines” — which is what we want for completions.

That’s also why I mentioned PowerShell earlier: Microsoft’s own PowerShell integration doesn’t try to parse the CLI text output either — they skip the CLI and talk directly to the COM/WinRT layer underneath, because that’s the only place where the data is actually structured. In other words, even the people closest to winget decided “parsing the pretty console output” is the wrong abstraction.

So that’s the reasoning behind my proposal: in Nushell, unless we also go to a structured source (like PS did), returning the raw CLI output is the most honest and the least fragile thing we can do right now. If/when winget gives us JSON/XML, I’m 100% on board with tables.

@fdncred
Copy link
Contributor

fdncred commented Oct 30, 2025

I understand your point. However, it seems like there's several ways to parse the results.

I use UniGetUI and it outputs to a grid as well. Not sure what it uses but it's open source too https://github.com/marticliment/UnigetUI

The 3rd bullet above has a blog post on what the output looks like when Invoke-WinGetCommand is called too https://powershellisfun.com/2024/11/28/using-the-powershell-winget-module/

@hcoona
Copy link
Author

hcoona commented Oct 31, 2025

Hi @fdncred,

Thanks again for taking the time to dig deeper into this and for sending concrete references -- that’s super helpful context.

On the third link (the PowerShell one): that’s exactly the implementation I’ve been referring to. Microsoft’s PowerShell module doesn’t try to parse the CLI text output either. It goes straight to the underlying COM/WinRT API so it can work with structured data. That design choice is, in my opinion, basically an admission from the source that “the pretty console output is not a stable contract,” so they avoid the parsing problem altogether.

On the second link (the wingetui TypeScript code): this is precisely the approach I was saying doesn’t hold up generally. It treats “two or more spaces” as column separators. You can see it here: https://github.com/ynsmrtpc/wingetui/blob/86f35a4366bb95b121e7c78acc3fb03584695c79/electron/services/winget.ts#L744. That works as long as the output is nicely spaced and the names don’t contain “version-like” substrings, but it’s fragile in the exact cases I showed earlier (narrow terminals, long names, names containing version-ish strings, single-space gaps, etc.).

On the first link (the C# one): it’s doing fixed-position substring slicing: https://github.com/baget/WingetUI/blob/a992b84b102c97a9524406811873eb41a69e53a4/Winget.cs#L46-L50. That can work if you control the environment, e.g. you run winget in a process that isn’t constrained by the user’s terminal width, or you know exactly what width you get back. But Nushell completions don’t have that guarantee. winget will adapt to the current terminal, so those fixed offsets can shift, which is the core reason I’ve been arguing “this isn’t a stable thing to parse” in this context.

That’s why I landed on: for this PR, in this environment, returning the raw CLI output is the least fragile, most honest option right now. If we later get a structured output (--output json, XML, whatever) I’d be very happy to wire that into Nushell tables. That’d actually be the nicest UX.

If you still feel strongly that the completion must emit tables no matter what, we can try to add a best-effort parser (basically the “2-spaces” approach) but I want to be explicit that it will be brittle across terminals/locales/longer names, which is the thing I’ve been trying to avoid. And honestly, if we forced a “best-effort” table parser here, I personally wouldn’t load that completion at all. It would introduce more trouble than convenience, just like the current implementation does. That’s really what I’m trying to avoid.

Thanks again for pushing on it. I’ve already gone through these options and that’s why I took the more conservative route here.

@fdncred
Copy link
Contributor

fdncred commented Oct 31, 2025

It goes straight to the underlying COM/WinRT API so it can work with structured data.

Can you show me where this happens? I was thinking this line below is just calling winget and getting the output then parsing.

https://github.com/microsoft/winget-cli/blob/7d72eb3b77d7fc511dd79c79b44fcf1935490a64/tools/PowerShell/Microsoft.WinGet.Client/src/Library/Invoke-WinGetCommand.ps1#L147

@hcoona
Copy link
Author

hcoona commented Oct 31, 2025

@fdncred Good catch! I realize there might be some confusion here because the file you linked isn’t from the currently maintained PowerShell module.

The file you linked does shell out to winget.exe and text-parse the console output, but that’s not the PowerShell module that ships today. The maintained Microsoft.WinGet.Client cmdlets are C# and call the WinGet COM/WinRT API (Microsoft.Management.Deployment) directly.

  1. The maintained PowerShell implementation now lives under the src/PowerShell/Microsoft.WinGet.Client.Cmdlets
    folder. Although it’s written in C#, that’s just the mechanism used to define the PowerShell cmdlets. The higher-level PowerShell layer you see here wraps those cmdlets.

  2. Those cmdlets ultimately call into the COM/WinRT APIs defined in Microsoft.Management.Deployment. The flow goes roughly like this (I ommitted a few callstack for brief):

    1. GetPackageCmdlet.cs
    2. ManagementDeploymentCommand.cs
    3. PackageManagerWrapper.cs
    4. finally down to PackageManager.h, which is the COM/WinRT interface providing structured access to the package data.
  3. The file you referenced (Invoke-WinGetCommand.ps1) comes from an older hackathon prototype from 2021 (Ref). It hasn’t been maintained since then and was never part of the officially shipped PowerShell module — that’s why it looks like it’s just shelling out to winget and parsing text output.

    image

So, to clarify: the current PowerShell module doesn’t parse the raw CLI output at all. It uses the COM/WinRT layer directly, which is how it can safely produce structured objects and formatted tables.

Does that line up with your understanding?

@fdncred
Copy link
Contributor

fdncred commented Oct 31, 2025

Does that line up with your understanding?

Yes, it does. However, it doesn't answer whether similar nushell code could be used to parse the output. It looks pretty interesting to me since it's atypical from what I normally see parsing textual output.

@hcoona
Copy link
Author

hcoona commented Nov 1, 2025

@fdncred Thanks for sticking with this. I think we’re finally looking at the same picture now.

What I’m hearing is:

  1. We both agree that the official / current Microsoft PowerShell path explicitly avoided parsing the winget.exe console output, and instead went to the COM/WinRT layer to get structured data.
  2. We both agree that the usual “split on 2+ spaces” style parsing isn’t reliable for winget output once you factor in long package names, embedded version-like strings, and different terminal widths.

Where we still differ is how much we’re willing to trade correctness for convenience:

  1. It sounds like your position is: “even if it’s not 100% correct, it’s still better Nushell UX to try to table it, as long as it’s readable most of the time.” That’s a reasonable goal for Nushell.

  2. My position is a bit stricter: on my machine, with a large but common set of packages, the output shape already breaks simple parsers (including the PowerShell sample you linked), so to me a best-effort parser is worse than no parser, especially for completions. If I can’t trust the result, I’ll just stop using it, and that defeats the purpose.

    image

That’s why I was proposing a small sequencing change:

  1. Merge the current PR so we at least have a working, predictable winget completion (i.e. the “correctness first” version).
  2. Then we can explore an optional/best-effort parser on top — either as a follow-up PR, or as a separate helper, or even as an opt-in flag — where we can iterate on heuristics without blocking the core completion.

This way:

  1. Nushell users get the working completion right away.
  2. People who really want tabular output can help iterate on a parser without forcing everyone into a brittle path.
  3. And if winget ever gives us structured output, we can flip to that and delete all the heuristics.

If that sounds acceptable, I’m happy to open a follow-up to track “best-effort tableization of winget output” and we can keep experimenting there.

Thanks again for pushing on quality here. I do appreciate it.

@fdncred
Copy link
Contributor

fdncred commented Nov 1, 2025

We need to find a better way. I'm fine with most things in this PR except removal of structured output.

@hcoona
Copy link
Author

hcoona commented Nov 2, 2025

@fdncred I’ll bring back the structured/table output so we can keep this PR moving forward.

That said, I still want to call out the screenshot I shared earlier: that exact output shape already breaks the kind of “looks-like-columns” parsing we’re talking about, and that’s on a normal machine with real data. So even if we keep the table step for now, I don’t think it’s a reliable abstraction, and I’d rather we treat it as “best effort, fragile” than “this is the right way to do winget in Nushell.”

I’ll update the PR accordingly.

image image

@hcoona hcoona force-pushed the dev/shuaizhang/update-nuget-completion branch from fcaa3db to 8e45c8d Compare November 2, 2025 03:27
@fdncred
Copy link
Contributor

fdncred commented Nov 2, 2025

can you provide the tabular winget cli output in the bottom screenshot as text?

@hcoona
Copy link
Author

hcoona commented Nov 3, 2025

@fdncred My environment has changed, but I can provide you with another one. However, I was surprised to find that even on the same machine, it sometimes produces the correct output and sometimes doesn’t. I didn’t change the terminal width or do anything else. I just executed the command 3 times.

❯ winget list `--upgrade-available`
╭─────┬────────────────┬─────────────────────────────────────────────────────────────────────────────────────────┬─────╮
│   # │      name      │                                           id                                            │ ... │
├─────┼────────────────┼─────────────────────────────────────────────────────────────────────────────────────────┼─────┤
│   0 │ Docker         │ Desktop                                                                                 │ ... │
│   1 │ Unity          │                                                                                         │ ... │
│   2 │                │ Nushell                                                                                 │ ... │
│   3 │ GitHub         │ CLI                                                                                     │ ... │
│   4 │ Pandoc         │ 3.8                                                                                     │ ... │
│   5 │ Microsoft      │ Azure Storage Explorer version 1.39.1 Microsoft.Azure.StorageExplorer        1.39.1     │ ... │
│     │                │ 1.40.0     winget                                                                       │     │
│   6 │ ManicTime      │ ManicTime.ManicTime                    25.2.2.0  25.3.0.0   winget                      │ ... │
│   7 │                │ Node.js                                                                                 │ ... │
│   8 │ Visual         │ Studio                                                                                  │ ... │
│   9 │ Trivy          │                                                                                         │ ... │
│  10 │                │ DBeaver                                                                                 │ ... │
│  11 │ Kubernetes     │                                                                                         │ ... │
│  12 │ uv             │                                                                                         │ ... │
│  13 │ mise-en-place  │                                                                                         │ ... │
│  14 │ 14 upgrades    │                                                                                         │ ... │
╰─────┴────────────────┴─────────────────────────────────────────────────────────────────────────────────────────┴─────╯
[WARN] - (starship::utils): Executing command "C:\\Users\\shuaizhang\\AppData\\Local\\mise\\installs\\node\\22.21.0\\node.exe" timed out.

Lucia-Platform on  main is 📦 v0.0.0-dev via .NET v8.0.414 via 🐹 v1.25.3 via  via 🐍 v3.12.12 took 22s
❯ winget list `--upgrade-available` --raw
Name                                            Id                                     Version   Available  Source
------------------------------------------------------------------------------------------------------------------
Docker Desktop                                  Docker.DockerDesktop                   4.48.0    4.49.0     winget
Unity Hub 3.14.0                                Unity.UnityHub                         3.14.0    3.14.3     winget
Nushell                                         Nushell.Nushell                        0.107.0   0.108.0    winget
GitHub CLI                                      GitHub.cli                             2.79.0    2.81.0     winget
Pandoc 3.8                                      JohnMacFarlane.Pandoc                  3.8       3.8.2.1    winget
Microsoft Azure Storage Explorer version 1.39.1 Microsoft.Azure.StorageExplorer        1.39.1    1.40.0     winget
ManicTime                                       ManicTime.ManicTime                    25.2.2.0  25.3.0.0   winget
Node.js                                         OpenJS.NodeJS.LTS                      22.19.0   24.11.0    winget
Visual Studio Enterprise 2022                   Microsoft.VisualStudio.2022.Enterprise 17.14.17  17.14.19   winget
Trivy                                           AquaSecurity.Trivy                     0.66.0    0.67.2     winget
DBeaver 25.2.0 (current user)                   DBeaver.DBeaver.Community              25.2.0    25.2.3     winget
Kubernetes CLI                                  Kubernetes.kubectl                     1.34.0    1.34.1     winget
uv                                              astral-sh.uv                           0.8.15    0.9.6      winget
mise-en-place                                   jdx.mise                               2025.10.6 2025.10.21 winget
14 upgrades available.

Lucia-Platform on  main is 📦 v0.0.0-dev via .NET v8.0.414 via 🐹 v1.25.3 via  v22.21.0 via 🐍 v3.12.12 took 3s
❯ winget list `--upgrade-available`
╭────┬─────────────────────────────────────────────────┬────────────────────────────────────────┬───────────┬──────┬───╮
│  # │                      name                       │                   id                   │  version  │ avai │ s │
│    │                                                 │                                        │           │ labl │ o │
│    │                                                 │                                        │           │ e    │ u │
│    │                                                 │                                        │           │      │ r │
│    │                                                 │                                        │           │      │ c │
│    │                                                 │                                        │           │      │ e │
├────┼─────────────────────────────────────────────────┼────────────────────────────────────────┼───────────┼──────┼───┤
│  0 │ Docker Desktop                                  │ Docker.DockerDesktop                   │ 4.48.0    │ 4.49 │ w │
│    │                                                 │                                        │           │ .0   │ i │
│    │                                                 │                                        │           │      │ n │
│    │                                                 │                                        │           │      │ g │
│    │                                                 │                                        │           │      │ e │
│    │                                                 │                                        │           │      │ t │
│  1 │ Unity Hub 3.14.0                                │ Unity.UnityHub                         │ 3.14.0    │ 3.14 │ w │
│    │                                                 │                                        │           │ .3   │ i │
│    │                                                 │                                        │           │      │ n │
│    │                                                 │                                        │           │      │ g │
│    │                                                 │                                        │           │      │ e │
│    │                                                 │                                        │           │      │ t │
│  2 │ Nushell                                         │ Nushell.Nushell                        │ 0.107.0   │ 0.10 │ w │
│    │                                                 │                                        │           │ 8.0  │ i │
│    │                                                 │                                        │           │      │ n │
│    │                                                 │                                        │           │      │ g │
│    │                                                 │                                        │           │      │ e │
│    │                                                 │                                        │           │      │ t │
│  3 │ GitHub CLI                                      │ GitHub.cli                             │ 2.79.0    │ 2.81 │ w │
│    │                                                 │                                        │           │ .0   │ i │
│    │                                                 │                                        │           │      │ n │
│    │                                                 │                                        │           │      │ g │
│    │                                                 │                                        │           │      │ e │
│    │                                                 │                                        │           │      │ t │
│  4 │ Pandoc 3.8                                      │ JohnMacFarlane.Pandoc                  │ 3.8       │ 3.8. │ w │
│    │                                                 │                                        │           │ 2.1  │ i │
│    │                                                 │                                        │           │      │ n │
│    │                                                 │                                        │           │      │ g │
│    │                                                 │                                        │           │      │ e │
│    │                                                 │                                        │           │      │ t │
│  5 │ Microsoft Azure Storage Explorer version 1.39.1 │ Microsoft.Azure.StorageExplorer        │ 1.39.1    │ 1.40 │ w │
│    │                                                 │                                        │           │ .0   │ i │
│    │                                                 │                                        │           │      │ n │
│    │                                                 │                                        │           │      │ g │
│    │                                                 │                                        │           │      │ e │
│    │                                                 │                                        │           │      │ t │
│  6 │ ManicTime                                       │ ManicTime.ManicTime                    │ 25.2.2.0  │ 25.3 │ w │
│    │                                                 │                                        │           │ .0.0 │ i │
│    │                                                 │                                        │           │      │ n │
│    │                                                 │                                        │           │      │ g │
│    │                                                 │                                        │           │      │ e │
│    │                                                 │                                        │           │      │ t │
│  7 │ Node.js                                         │ OpenJS.NodeJS.LTS                      │ 22.19.0   │ 24.1 │ w │
│    │                                                 │                                        │           │ 1.0  │ i │
│    │                                                 │                                        │           │      │ n │
│    │                                                 │                                        │           │      │ g │
│    │                                                 │                                        │           │      │ e │
│    │                                                 │                                        │           │      │ t │
│  8 │ Visual Studio Enterprise 2022                   │ Microsoft.VisualStudio.2022.Enterprise │ 17.14.17  │ 17.1 │ w │
│    │                                                 │                                        │           │ 4.19 │ i │
│    │                                                 │                                        │           │      │ n │
│    │                                                 │                                        │           │      │ g │
│    │                                                 │                                        │           │      │ e │
│    │                                                 │                                        │           │      │ t │
│  9 │ Trivy                                           │ AquaSecurity.Trivy                     │ 0.66.0    │ 0.67 │ w │
│    │                                                 │                                        │           │ .2   │ i │
│    │                                                 │                                        │           │      │ n │
│    │                                                 │                                        │           │      │ g │
│    │                                                 │                                        │           │      │ e │
│    │                                                 │                                        │           │      │ t │
│ 10 │ DBeaver 25.2.0 (current user)                   │ DBeaver.DBeaver.Community              │ 25.2.0    │ 25.2 │ w │
│    │                                                 │                                        │           │ .3   │ i │
│    │                                                 │                                        │           │      │ n │
│    │                                                 │                                        │           │      │ g │
│    │                                                 │                                        │           │      │ e │
│    │                                                 │                                        │           │      │ t │
│ 11 │ Kubernetes CLI                                  │ Kubernetes.kubectl                     │ 1.34.0    │ 1.34 │ w │
│    │                                                 │                                        │           │ .1   │ i │
│    │                                                 │                                        │           │      │ n │
│    │                                                 │                                        │           │      │ g │
│    │                                                 │                                        │           │      │ e │
│    │                                                 │                                        │           │      │ t │
│ 12 │ uv                                              │ astral-sh.uv                           │ 0.8.15    │ 0.9. │ w │
│    │                                                 │                                        │           │ 6    │ i │
│    │                                                 │                                        │           │      │ n │
│    │                                                 │                                        │           │      │ g │
│    │                                                 │                                        │           │      │ e │
│    │                                                 │                                        │           │      │ t │
│ 13 │ mise-en-place                                   │ jdx.mise                               │ 2025.10.6 │ 2025 │ w │
│    │                                                 │                                        │           │ .10. │ i │
│    │                                                 │                                        │           │ 21   │ n │
│    │                                                 │                                        │           │      │ g │
│    │                                                 │                                        │           │      │ e │
│    │                                                 │                                        │           │      │ t │
│ 14 │ 14 upgrades available.                          │                                        │           │      │   │
╰────┴─────────────────────────────────────────────────┴────────────────────────────────────────┴───────────┴──────┴───╯

Another case:

❯ winget list --upgrade-available
╭────┬───────────────┬──────────────────────────────────────────────────────────────────────────────────────┬────┬─────╮
│  # │     1024      │                                          KB                                          │ /  │ ... │
├────┼───────────────┼──────────────────────────────────────────────────────────────────────────────────────┼────┼─────┤
│  0 │ foobar2000    │                                                                                      │    │ ... │
│  1 │ Neovim        │                                                                                      │    │ ... │
│  2 │ Microsoft     │ GameInput           Microsoft.GameInput         3.0.26100.6154 3.1.26100.6879 winget │    │ ... │
│  3 │ ManicTime     │ ManicTime.ManicTime         25.2.2.0       25.3.0.0       winget                     │    │ ... │
│  4 │ Adobe         │ Acrobat                                                                              │    │ ... │
│  5 │ MPC-BE        │ x64                                                                                  │    │ ... │
│  6 │ QQ            │                                                                                      │    │ ... │
│  7 │ 微信          │                                                                                      │    │ ... │
│  8 │ Studio        │ 2.0                                                                                  │    │ ... │
│  9 │               │ DBeaver                                                                              │    │ ... │
│ 10 │ FastCopy      │                                                                                      │    │ ... │
│ 11 │ Kindle        │ Previewer                                                                            │    │ ... │
│ 12 │ Obsidian      │                                                                                      │    │ ... │
│ 13 │ mise-en-place │                                                                                      │    │ ... │
│ 14 │ Telegram      │                                                                                      │ De │ ... │
│    │               │                                                                                      │ sk │     │
│    │               │                                                                                      │ to │     │
│    │               │                                                                                      │ p  │     │
│ 15 │ PowerToys     │ (Preview) x64       Microsoft.PowerToys         0.94.0         0.95.0         winget │    │ ... │
│ 16 │ ImageMagick   │                                                                                      │    │ ... │
│ 17 │ 17 upgrades   │                                                                                      │    │ ... │
│ 18 │ 1 package(s)  │                                                                                      │    │ ... │
╰────┴───────────────┴──────────────────────────────────────────────────────────────────────────────────────┴────┴─────╯

~ took 6s
❯ winget list --upgrade-available --raw
Name                          Id                          Version        Available      Source
----------------------------------------------------------------------------------------------
foobar2000 v2.25.1 (x64)      PeterPawlowski.foobar2000   2.25.1         2.25.2         winget
Neovim                        Neovim.Neovim               0.11.4         0.11.5         winget
Microsoft GameInput           Microsoft.GameInput         3.0.26100.6154 3.1.26100.6879 winget
ManicTime                     ManicTime.ManicTime         25.2.2.0       25.3.0.0       winget
Adobe Acrobat (64-bit)        Adobe.Acrobat.Reader.64-bit 25.001.20643   25.001.20813   winget
MPC-BE x64 1.8.7              MPC-BE.MPC-BE               1.8.7          1.8.8          winget
QQ                            Tencent.QQ.NT               9.9.21.39038   9.9.22.40990   winget
微信                          Tencent.WeChat.Universal    4.1.1.19       4.1.2.18       winget
Studio 2.0 version 2.25.10_1  BrickLink.Studio            2.25.10_1      2.25.10_5      winget
DBeaver 25.2.1 (current user) DBeaver.DBeaver.Community   25.2.1         25.2.4         winget
FastCopy                      FastCopy.FastCopy           5.10.0         5.11.1         winget
Kindle Previewer 3            Amazon.KindlePreviewer      3.98.0         3.99.0         winget
Obsidian                      Obsidian.Obsidian           1.9.12         1.9.14         winget
mise-en-place                 jdx.mise                    2025.10.21     2025.11.1      winget
Telegram Desktop              Telegram.TelegramDesktop    6.1.3          6.2.4          winget
PowerToys (Preview) x64       Microsoft.PowerToys         0.94.0         0.95.0         winget
ImageMagick Q16-HDRI          ImageMagick.Q16-HDRI        7.1.2.3        7.1.2.7        winget
17 upgrades available.
1 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.

~ took 3s
❯ winget list --upgrade-available
╭────┬───────────────────────────────────┬─────────────────────────────┬───────────────────────┬────────────────┬──────╮
│  # │               name                │             id              │        version        │   available    │ sour │
│    │                                   │                             │                       │                │ ce   │
├────┼───────────────────────────────────┼─────────────────────────────┼───────────────────────┼────────────────┼──────┤
│  0 │ foobar2000 v2.25.1 (x64)          │ PeterPawlowski.foobar2000   │ 2.25.1                │ 2.25.2         │ wing │
│    │                                   │                             │                       │                │ et   │
│  1 │ Neovim                            │ Neovim.Neovim               │ 0.11.4                │ 0.11.5         │ wing │
│    │                                   │                             │                       │                │ et   │
│  2 │ Microsoft GameInput               │ Microsoft.GameInput         │ 3.0.26100.6154        │ 3.1.26100.6879 │ wing │
│    │                                   │                             │                       │                │ et   │
│  3 │ ManicTime                         │ ManicTime.ManicTime         │ 25.2.2.0              │ 25.3.0.0       │ wing │
│    │                                   │                             │                       │                │ et   │
│  4 │ Adobe Acrobat (64-bit)            │ Adobe.Acrobat.Reader.64-bit │ 25.001.20643          │ 25.001.20813   │ wing │
│    │                                   │                             │                       │                │ et   │
│  5 │ MPC-BE x64 1.8.7                  │ MPC-BE.MPC-BE               │ 1.8.7                 │ 1.8.8          │ wing │
│    │                                   │                             │                       │                │ et   │
│  6 │ QQ                                │ Tencent.QQ.NT               │ 9.9.21.39038          │ 9.9.22.40990   │ wing │
│    │                                   │                             │                       │                │ et   │
│  7 │ 微信                              │ Tencent.WeChat.Universal    │ 4.1.1.19              │ 4.1.2.18       │ wing │
│    │                                   │                             │                       │                │ et   │
│  8 │ Studio 2.0 version 2.25.10_1      │ BrickLink.Studio            │ 2.25.10_1             │ 2.25.10_5      │ wing │
│    │                                   │                             │                       │                │ et   │
│  9 │ DBeaver 25.2.1 (current user)     │ DBeaver.DBeaver.Community   │ 25.2.1                │ 25.2.4         │ wing │
│    │                                   │                             │                       │                │ et   │
│ 10 │ FastCopy                          │ FastCopy.FastCopy           │ 5.10.0                │ 5.11.1         │ wing │
│    │                                   │                             │                       │                │ et   │
│ 11 │ Kindle Previewer 3                │ Amazon.KindlePreviewer      │ 3.98.0                │ 3.99.0         │ wing │
│    │                                   │                             │                       │                │ et   │
│ 12 │ Obsidian                          │ Obsidian.Obsidian           │ 1.9.12                │ 1.9.14         │ wing │
│    │                                   │                             │                       │                │ et   │
│ 13 │ mise-en-place                     │ jdx.mise                    │ 2025.10.21            │ 2025.11.1      │ wing │
│    │                                   │                             │                       │                │ et   │
│ 14 │ Telegram Desktop                  │ Telegram.TelegramDesktop    │ 6.1.3                 │ 6.2.4          │ wing │
│    │                                   │                             │                       │                │ et   │
│ 15 │ PowerToys (Preview) x64           │ Microsoft.PowerToys         │ 0.94.0                │ 0.95.0         │ wing │
│    │                                   │                             │                       │                │ et   │
│ 16 │ ImageMagick Q16-HDRI              │ ImageMagick.Q16-HDRI        │ 7.1.2.3               │ 7.1.2.7        │ wing │
│    │                                   │                             │                       │                │ et   │
│ 17 │ 17 upgrades available.            │                             │                       │                │      │
│ 18 │ 1 package(s) have version numbers │ that cannot be determined.  │ Use --include-unknown │ to see         │ e    │
│    │                                   │                             │                       │                │ all  │
│    │                                   │                             │                       │                │ resu │
│    │                                   │                             │                       │                │ lts. │
╰────┴───────────────────────────────────┴─────────────────────────────┴───────────────────────┴────────────────┴──────╯

@hcoona
Copy link
Author

hcoona commented Nov 3, 2025

BTW, I’ve updated the PR to add back the tablizing logic and also updated the PR description to match the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants