{"id":24180096,"url":"https://github.com/mtpontes/winget-list-handler","last_synced_at":"2025-10-14T07:31:42.110Z","repository":{"id":271644827,"uuid":"913060362","full_name":"mtpontes/winget-list-handler","owner":"mtpontes","description":"Package installation automation via winget","archived":false,"fork":false,"pushed_at":"2025-06-01T23:08:25.000Z","size":172,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-02T09:14:43.585Z","etag":null,"topics":["automation","backup","backup-script","commanderjs","nodejs","package-manager","typescript","windows","winget","winget-cli"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mtpontes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-07T00:31:43.000Z","updated_at":"2025-06-01T23:08:28.000Z","dependencies_parsed_at":"2025-05-24T20:25:52.943Z","dependency_job_id":"edc7d820-1226-4089-9aef-7dd2f28dd352","html_url":"https://github.com/mtpontes/winget-list-handler","commit_stats":null,"previous_names":["mtpontes/winget_list_handler","mtpontes/winget-list-handler"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/mtpontes/winget-list-handler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtpontes%2Fwinget-list-handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtpontes%2Fwinget-list-handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtpontes%2Fwinget-list-handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtpontes%2Fwinget-list-handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mtpontes","download_url":"https://codeload.github.com/mtpontes/winget-list-handler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtpontes%2Fwinget-list-handler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018225,"owners_count":26086307,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","backup","backup-script","commanderjs","nodejs","package-manager","typescript","windows","winget","winget-cli"],"created_at":"2025-01-13T06:11:45.091Z","updated_at":"2025-10-14T07:31:42.104Z","avatar_url":"https://github.com/mtpontes.png","language":"TypeScript","readme":"# Winget List Handler\n\nThis project automates the process of reinstalling applications after reinstall the system. Using winget, it allows you to generate a report with all applications installed on Windows (including those that were not installed via winget) and facilitates the automatic reinstallation of compatible apps.\n\nIn addition, if an application cannot be installed automatically, the project generates a report (`badApps.json`) indicating which apps still need to be installed manually.\n\n## 📌 How does it work?\n\n1️⃣ **App report generation**: generates reference files with the list of installed applications.\n\n2️⃣ **App report consumption**: consumes the reports to perform the installations.\n\n## Application Flow\n\u003cp align=\"center\"\u003e\u003cimg src=\"./assets/application-flow.svg\" alt=\"Application flow\"\u003e\u003c/p\u003e\n\n## 📦 CLI Commands Reference\n\nTable with the available CLI commands and their options:\n\n| Command          | Description                                                                                | Options                                                                                                                       | Usage Example                                           |\n| ---------------- | ------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |\n| `generate-files` | Generates the `apps.json` and `badApps.json` files based on packages recognized by Winget. | _None_                                                                                                                        | `generate-files`                                        |\n| `consume-file`   | Installs the applications listed in the `apps.json` file.                                  | `--async`\u003cbr\u003eInstalls apps asynchronously.\u003cbr\u003e`--async-jobs \u003cnumber\u003e`\u003cbr\u003eDefines how many simultaneous installations (1–100). | `consume-file --async`\u003cbr\u003e`consume-file --async-jobs 5` |\n\n\u003cdetails\u003e\n  \u003csummary\u003e\n    \u003ch2\u003e 👤Usage instructions\u003c/h2\u003e    \n  \u003c/summary\u003e\n\n### Prerequisites for use\n\n- Windows 10/11\n- Winget-cli\n\n### Download and Install\n\n1. Access the project's [releases page](https://github.com/mtpontes/winget-list-handler/releases).\n2. Download the latest version of the `winget-handler.exe` file.\n3. Keep this `.exe` in an isolated directory for better use.\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003ch3\u003e1. Configure Winget\u003c/h3\u003e\u003c/summary\u003e\n\nBefore you start using the solution, check if you have winget installed and configured correctly on your machine.\n\nBy default, Winget is already installed on Windows 10/11 systems, but if you don't have it, get it from its official [repository](https://github.com/microsoft/winget-cli?tab=readme-ov-file). Just go to the releases page and download the package with the `.msixbundle` extension in _assets_ and run the installation.\n\n[Official Winget-cli](https://github.com/microsoft/winget-cli?tab=readme-ov-file)\n\nUse the following command to check if Winget is installed:\n\n```sh\nwinget --version\n```\n\nThen use the following command and accept the Microsoft Store terms:\n\n```sh\nwinget list\n```\n\nWhen asked about the Microsoft Store terms, press `Y` to accept.\n\nIf this term is not accepted, it will not be possible to use the solution. This term is from Microsoft for use of the\nWinget tool and has no direct relation to the application, however, this solution is based on the Winget tool and\nrelies on it being properly configured to work.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003ch3\u003e2️. Generate reports before system reinstallation\u003c/h3\u003e\u003c/summary\u003e\n\nBefore before system reinstallation, run the application report generation. These reports are necessary for the solution\nto install the current applications on the machine. In addition, it also provides a report with the list of applications that will not be installed by the solution, serving as a guideline for which apps you will need to install manually.\n\nRun the command to generate the reference files for the installed applications:\n\n```sh\n./winget-handler generate-files\n```\n\nThis will create a directory and two files where `winget-handler.exe` is running:\n\n📁 **`generatedFiles`** → Contains the application reports.\n\n📄 **`apps.json`** → Contains only the applications that can be reinstalled automatically via winget. It is crucial for the next step and operation of the solution.\n\n📄 **`badApps.json`** → Lists the applications that **cannot** be reinstalled automatically, either due to lack of support in winget or due to problems with the output of the `winget list` command.\n\n📄 **`fails.json`** → Lists the apps that presented some errors during the installation.\n\nCopy the `generatedFiles` directory and the `winget-handler.exe` executable to a safe.\n\nAfter that, you can reinstall the system.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003ch3\u003e3️. Install applications after reinstalling the system\u003c/h3\u003e\u003c/summary\u003e\n\nAfter reinstall the system, recover the `generatedFiles` directory and the `winget-handler.exe` executable.\n\nThen, run one of the three commands:\n\n- **Install the apps one at a time**\n  The packages will be installed **one by one** synchronously.\n\n  ```sh\n  ./winget-handler consume-file\n  ```\n\n- **Installs 5 apps simultaneously in a queue**\n\n  When an installation is finished, start another one that is in the queue\n\n  ```sh\n  ./winget-handler consume-file --async\n  ```\n\n- **Allows you to define how many apps can be installed simultaneously**\n\n  ```\n  ./winget-handler consume-file --async-jobs=\u003cNUMBER_FROM_1_TO_100\u003e\n  ```\n\n\u003c/details\u003e\n\n---\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003ch2\u003e📢 Observations\u003c/h2\u003e\u003c/summary\u003e\n\nThis process may take a while, as it depends on the speed of the package servers and the capacity of your hardware.\n\n- Synchronous installation is slower, but consumes less RAM, CPU and storage writes.\n- Asynchronous installation is faster, but the number of packages installed simultaneously can impact the overall performance of the machine, and may be limited by the write speed of the system's default storage.\n- The default for asynchronous installations is 5 simultaneous packages.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003ch2\u003e❓ Known Issues\u003c/h2\u003e\u003c/summary\u003e\n\n- **Winget is not installed/configured**: Make sure Winget is installed and configured correctly.\n- **Some applications were not reinstalled**: Check the `badApps.json` file and install manually.\n- **Error running the executable**: Run as administrator and try again.\n- **The app does not find the file exec.bat**: Keep the exec.bat file at the same `.exe` application level level. The .bat file was the way I found to circumvent some terminal limitations. For some specific applications it is necessary to insert a second input that may vary from package to package, but when the execution is done via .BAT This second input is ignored and the winget follows the normal flow.\n\nIf you encounter other problems, please open an [issue](https://github.com/mtpontes/winget-list-handler/issues) in the repository.\n\n\u003c/details\u003e\n\u003c/details\u003e\n\n## ⭐ Show your support!\n\nIf this tool helped you, please consider giving the project a ⭐ on GitHub and sharing it with your friends. Your support helps keep it alive and increases its reach.\n\nThanks! 👏\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtpontes%2Fwinget-list-handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmtpontes%2Fwinget-list-handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtpontes%2Fwinget-list-handler/lists"}