-
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
Export/Import apps list #220
Comments
For an example in other package managers see Homebrew's brew bundle. Nice thing about it is it's easy to add support for other tools like Casks, mas, and whalebrew, all of which are (or started as) third-party extensions to brew. |
The schema for the import file is located at https://aka.ms/winget-packages.schema.1.0.json |
I'll be publishing a build with "import" enabled next week if testing goes well. I'm publishing a sample file here as a starting point. {
"$schema" : "https://aka.ms/winget-packages.schema.1.0.json",
"CreationDate" : "2021- 3-18 13:14:44.599",
"Sources" :
[
{
"Packages" :
[
{
"Id" : "Microsoft.Whiteboard"
}
],
"SourceDetails" :
{
"Argument" : "https://winget.azureedge.net/msstore",
"Identifier" : "Microsoft.Winget.MSStore.Source_8wekyb3d8bbwe",
"Name" : "msstore",
"Type" : "Microsoft.PreIndexed.Package"
}
},
{
"Packages" :
[
{
"Id" : "Microsoft.PowerToys"
}
],
"SourceDetails" :
{
"Argument" : "https://winget.azureedge.net/cache",
"Identifier" : "Microsoft.Winget.Source_8wekyb3d8bbwe",
"Name" : "winget",
"Type" : "Microsoft.PreIndexed.Package"
}
}
],
"WinGetVersion" : "0.2.10771"
} |
Note: if you have a terminal or shell in your import, it will restart and interrupt the flow of package installation. I've had success with one of these packages if it's the last one in the list. |
Import was just released as a stable feature https://github.com/microsoft/winget-cli/releases/tag/v-0.3.11102-preview. |
Is there a site where I can select apps and create a json file? |
I wonder if export feature could also output list of generic unknown source and its version info from registry if available |
@quangkieu what scenario would providing the list of applications without a known source address? You've piqued my interest 😄 |
Sorry but I don't understand which settings you are talking about. Can you help me? |
@gioluca2 you can execute You can enable the "export" ("list" is also required) as an experimental feature to generate an initial file to start with: Then you can edit the packages listed in that file to build an import. Here is a sample for settings.json: {
"$schema": "https://aka.ms/winget-settings.schema.json",
"experimentalFeatures": {
"list": true,
"export": true
}
} |
The command "winget list" returns wrong ids. I try to import this packages.json:
|
@gioluca2 the "Id" needs to be the same value as "PackageIdentifier" in the v1.0 manifest schema. For example, "7-zip" should be "7zip.7zip" |
And so I have to search all packages one by one... |
We're still working on the logic for list (it drives export and several other features). I've made several changes recently to manifests to improve matching (including 7-zip). We have a client coming out in the next few days with changes implemented to improve matching logic. We will continue working on this area. It's the reason "list", "upgrade", "uninstall", and "export" are all still experimental features. |
Hey @denelon, mostly so the output of export match what |
will import support interactive to exclude some packages? |
@Airkro feel free to request the feature covering the scenario you are interested in 😄. The initial intent for import was to give a single command to install a set of packages. Most of the users requesting that capability in asks I received were looking for unattended use cases. I think we will want to be able to have commands or arguments (and an import file structure) to support many other scenarios. Several installers don't support silent/unattended behavior. In order to allow those into the repository we need to ensure the silent/unattended scenario works for the other commands in the Windows Package Manager client. |
I can't find real ID of bitdefender, ffbatch and office 2019. Can you help me? |
@gioluca, I did a search for all three. "Microsoft.Office" version 16.0.1329.20371 is available. You might need to create a "Help-Wanted" Issues in the https://github.com/microsoft/winget-pkgs repository to ask for the other two packages to be added. |
Description of the new feature/enhancement
Allow the user to export a list of all currently installed apps from WinGet.
This list can then be imported (with the specific versions too) on WinGet and its apps will be batch installed. Useful for a "dotfiles-based" computer setup, where I just have a winget-apps.json and can set my machine up with a single command.
Poposed commands:
winget export <app-list>
--all
or*
for exporting the entire list.winget import <file-path>
Edited by denelon:
Stable Feature
winget import packages.json
- installs packages referenced in packages.json (requires sources to be configured).winget import -?
- displays help for the import command.Experimental Feature
winget export packages.json
- generates export file for packages in Add / Remove Programs matching installed sources.winget export -?
- displays help for the export command.Note: export depends on list also being enabled.
winget features
- displays all experimental features and their statuswinget settings
- launches settings.json to configure settings like experimental featuresEdited: experimental status
The text was updated successfully, but these errors were encountered: