microsoft / microsoft/winget-cli

Improve import command with install/add functionality on a per-package basis

Open
#3,400 4 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Command-Export Command-Import Issue-Feature
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Description of the new feature / enhancement

I was surprised to see how light on features the import command is. I was about to switch my bespoke winget scripts over to use import instead of install, but instantly ran into some dealbreakers.
Notably, some of the packages I'm installing require the use of --custom, and I wish that I could also specify silent per-package.

I imagine some people would require --location and --architecture, and --override to genuinely make use of this feature as well. I can't imagine many people are using import given the current state?

Note this is distinctly different than #3373 which I believe is wanting more functionality at the command level, rather than the per-package level.

Proposed technical implementation details

I haven't dug into winget-cli's code but I'm hopeful it isn't too difficult to add additional optional entries to packages.schema.2.0.json, for each of these features much the same way that Scope is in there.

Then from there, assuming import calls into the same path as winget install does, just construct the arguments from the imported json as necessary.

There is an open question on exporting some of these things given that the history of them may have been lost after install?

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 schemas/JSON/packages/packages.schema.2.0.json, then trace how import invokes the install path and where per-package options are constructed. Done means the package schema and import processing cover the requested per-package options, with export behavior addressed as part of the open question.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, json
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.