Status: Done (2026-03-18)
Priority: Low
Component: lib/scoop/scoop.ps1 (new), lib/scoop/scoop.Tests.ps1 (new), tools/scoop/update-scoop.ps1 (new), tools/scoop/update-scoop.bat (new)
Description:
Interactive helper script to update installed Scoop packages. Launched via Keypirinha or FlowLauncher (.bat wrapper). Refreshes Scoop and bucket info first, then shows a numbered list of updatable apps. User can select one, several (comma-separated), or all apps to update.
All logic lives in lib/scoop/scoop.ps1 (dot-sourced library). tools/scoop/update-scoop.ps1 is a thin wrapper that sources the library and calls the entry point (following the wsl-manager pattern).
Behavior:
- Run
scoop update(refresh Scoop itself + bucket info) - Run
scoop statusto get list of updatable apps - If no updates available, display message and exit
- Display numbered list of updatable apps with current and latest versions
- Prompt: enter number(s) comma-separated, or
Afor all - Update selected app(s) via
scoop update <name>
Implementation (follows tools/wsl-manager/ pattern):
- Library functions in
lib/scoop/scoop.ps1(dot-sourced, noSet-StrictMode) - Sources
lib/utils/utils.ps1forInvoke-CommandLine,Write-Status, etc. - Thin wrapper in
tools/scoop/update-scoop.ps1withSet-StrictMode .batwrapper for launcher integration- CI/test environment awareness via
Test-RunningInCIorTestEnvironment
Acceptance Criteria:
-
lib/scoop/scoop.ps1created with all functions -
lib/scoop/scoop.Tests.ps1created with unit tests -
tools/scoop/update-scoop.ps1created as thin wrapper -
.batwrapper created for Keypirinha/FlowLauncher launch - Runs
scoop updateto refresh Scoop before checking status - Runs
scoop statusand parses output to list updatable apps - Shows numbered list with app name, current version, and latest version
- User can enter
Ato update all apps - User can enter comma-separated numbers to update specific apps
- User can enter a single number to update one app
- Uses
Invoke-CommandLinefor all external commands - Clear status/success/error output using
Write-Status/Write-Success/Write-ErrorMsg - CI/test environment awareness
- All existing tests continue to pass
- Fix
Get-ScoopUpdatableAppto handle PSCustomObject output from modern scoop (PS 7.x) - Fix
PSAvoidUsingWriteHostlinting failure inupdate-scoop.ps1 - Add unit test for PSCustomObject parsing path
- Add sanity check in integration test to catch vacuous passes