Winget List - add machine-parseable output #3051
Labels
Issue-Feature
This is a feature request for the Windows Package Manager client.
Resolution-Duplicate
Issue is a duplicate
Milestone
Description of the new feature / enhancement
#1155
Winget List is useful for scripting to check if a package is present, but current output is human-oriented.
I often need to check if a specific package version is installed, or what version of a specific package is installed.
Currently I have to parse text output, which is not fun, given the variable column names/widths etc.
Proposal: Add an option to display the results as CSV/JSON/XML/anything else machine readable vs human-readable for scripting. This is in addition to what export offers. Export currently dumps a lot, requires a file and takes a lot of time. This should run quickly (a single package and dump to stdout (for capture/redirection).
Proposed technical implementation details
winget list <query> --out-json
returns a JSON object into stdout (for redirection / capture)
Optionally
--out-csv
,--out-xml
etc.The text was updated successfully, but these errors were encountered: