microsoft / microsoft/winget-cli

JSON Formatted Output Support

Open
#184 18 comments 56 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Feature
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

Parent / tracking issue for structured, machine-readable output in WinGet.

To enable automation and consumption by other tools, WinGet commands should be able to emit structured output (e.g. JSON) in addition to the default human-readable tables. Parsing the default console output is brittle; a stable structured format lets scripts and tools consume results reliably.

This issue tracks the overall effort; individual slices are tracked as sub-issues / related work below.

Scope
  • A consistent --format json (and potentially other structured formats) across commands that produce output — e.g. list, upgrade, search, show, export.
  • A stable, documented schema for each command's structured output.
  • Where appropriate, keep the shape of the structured output (field names and structure) aligned with the objects returned by the WinGet PowerShell module, so consumers get a consistent schema across the CLI and the module rather than two divergent shapes.
  • Well-defined behavior for empty results and error paths so output stays parseable.
Related work and sub-issues
  • In flight: PR #6346 adds --format json for list and upgrade (list-only) output.
  • #1753 (closed) — original request for structured format options on list/upgrade; covered by the work above.
  • #2030 — richer package information in winget export JSON output (export payload).
Out of scope (separate concerns)
  • Output verbosity — how much WinGet prints to the console (tracked in #161).
  • Diagnostic log level — a distinct concern from output format.

Updated with GitHub Copilot.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with PR #6346 and the related issues #1753 and #2030 to understand which structured-output slices are already covered. Done would require consistent JSON output across the listed commands, documented stable schemas, and parseable empty-result and error behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, json, powershell
Domain
cli, documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.