Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

repoRefresh

repoRefresh is a multi-threaded PowerShell automation tool designed to keep an offline software repository (installers, executables, MSIs, offline bundles) synchronized with the latest package releases available via winget.

It features a real-time terminal dashboard, multi-worker parallel execution for both metadata analysis and package downloads, automatic retry policies, and granular directory structure mapping.

repoRefresh

✨ Features

  • Multi-Worker Analysis: Parallel querying of winget repositories to quickly identify outdated or missing packages.
  • Concurrent Downloads: Asynchronous parallel file downloads powered by thread-safe background runspaces.
  • Smart Idempotency: Automatically skips re-downloading installer files if the exact target version is already present on disk.
  • Dynamic Live Terminal UI: Real-time progress bars, speed metrics, window resize compensation, and active task tracking.
  • Auto-Retry Mechanism: Configurable retries for transient download or network failures.
  • Flexible Path Structure: Organize installers into custom folder hierarchies defined in a single CSV file.

📋 Prerequisites

  • Windows 10 / 11 (or Windows Server with winget installed)
  • PowerShell 5.1 or PowerShell Core (7.x+)
  • winget (Windows Package Manager) installed and available in system PATH (included with App Installer on Windows).

🚀 Quick Start

1. Configure apps.csv

Create or edit apps.csv in the script directory (or pass a custom path via parameter). The CSV requires two mandatory headers: AppID and FolderPath.

AppID,FolderPath
Git.Git,Developer\Git
Microsoft.VisualStudioCode,Developer\VSCode
VideoLAN.VLC,Media\VLC
7zip.7zip,Utilities\7Zip
  • AppID: The exact package ID from winget (e.g., Git.Git).
  • FolderPath: Subfolder relative to -BasePath where the installer will be stored.

2. Run the Script

.\repoRefresh.ps1 -BasePath "C:\Repository\Software"

⚙️ Parameters

Parameter Default Value Description
-BasePath C:\D\rb\GoogleDrive\software-tier-1 Root folder where installer files will be downloaded and structured.
-CsvPath .\apps.csv Path to the CSV mapping file.
-AnalysisWorkers 2 Number of concurrent threads evaluating winget repository status.
-DownloadWorkers 3 Number of parallel download threads.
-DownloadRetries 2 Number of retry attempts per package upon download failure.

Example with Custom Options:

.\repoRefresh.ps1 `
    -BasePath "D:\SoftwareArchive" `
    -CsvPath "C:\Configs\my_apps.csv" `
    -AnalysisWorkers 4 `
    -DownloadWorkers 5 `
    -DownloadRetries 3

🛠️ Troubleshooting

Error 0x8a15000f

If winget throws source or package registration errors (e.g., 0x8a15000f), re-register the Winget source package in PowerShell:

Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.Winget.Source_8wekyb3d8bbwe

ko-fi

About

Keep your offline software repository up to date

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Sponsor this project

Contributors

Languages