-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON Formatted Output Support #184
Comments
Modern Windows command line apps are in powershell, and already output structured objects. These can already be converted to JSON, Excel, CSV, or whatever other format is preferred. The issue is that winget is unique, in that it doesn't output any structured data. #196 was created to address this issue but it was closed. |
@mikemaccana As mentioned on the other two issues, PowerShell isn't available in all Windows SKUs which this is targeting. For native PowerShell support, you're looking for #221. |
@RichiCoder1 Could you list all target SKUs and/or a link to the requirements spec, please? |
It's been mentioned multiple times across multiple sources: |
@RichiCoder1 I'm going through the backlog as a part of our planning exercise for the next few milestones. I'm going to close this as a Duplicate of #221. |
@RichiCoder1 we've identified this Issue as a duplicate of another one that already exists. This specific instance is being closed in favor of tracking the concern over on the referenced Issue. Thanks for your report! Be sure to add your 👍 to the other issue to help raise the priority. |
I'm cool with that as long as the ultimate functionality is still flexible enough to be consumed from other tools |
Yes, that is the intent. Rather than building some kind of |
Woo native powershell implementation! That’s exactly what I personally
wanted.
|
You can turn output from any powershell command into JSON by piping to
convertto-JSON
|
I think It feels very wasteful to call powershel.exe or pwsh.exe every time I use winget on non-PowerShell shell. |
I'm going to re-open this issue. It's not high-priority (unless we see a lot of 👍) since we have the option in PowerShell, but I can see value in what is being asked for. We still have more work to completely move everything the CLI is calling into the COM APIs, and once that's done, providing some kind of output type/format "should" be a bit easier to implement. |
I'd like to note one thing in reference to powershell. Until the winget powershell module can be used in system context there is a gap in functionality that could be filled if winget output could be json formatted. That would make converting winget output to a powershell object very easy. |
Can we get an update on this? It would be a very beneficial feature to output structured data like most other modern cli's. |
Hey everyone, we've been publishing the Microsoft.WinGet.Client PowerShell module for the last several months with each WinGet release. It now works on Windows PowerShell and it works in system context (depending on the installer one is trying to use, and the scope is "System"). |
Description of the new feature/enhancement
To enable automation and consumption via other tools, it'd be great if current and future commands supported a JSON output mode.
The text was updated successfully, but these errors were encountered: