Releasing soon Vigo is in alpha and closing in on its first stable release. Expect breaking changes between releases until then — we're looking for testing partners with meaningful fleets across diverse architectures. Learn more →

package_windows

Manages Windows packages using the first available package manager: Chocolatey, winget, or Scoop.

Parameters

Parameter Required Default Description
package Yes -- Package name/ID.
state Yes -- Desired state: present, absent, or latest.

States

  • present -- Ensure the package is installed.
  • absent -- Uninstall the package.
  • latest -- Install if not present, or upgrade if already installed.

Package Manager Detection

The executor auto-detects the available package manager in priority order:

  1. Chocolatey (choco.exe) -- choco install -y --no-progress
  2. winget (winget.exe) -- winget install --exact --id <name> --silent
  3. Scoop (scoop.cmd) -- scoop install <name>

If none are found, the executor returns an error.

Idempotency

Queries the detected package manager to check if the package is installed and its current version before acting.

Examples

Basic

resources:
  - name: Install Git
    type: package
    package: Git.Git

Ensure latest

resources:
  - name: Keep 7-Zip updated
    type: package
    package: 7zip
    state: latest

Uninstall

resources:
  - name: Remove old package
    type: package
    package: legacy-tool
    state: absent

Platform

Windows only. On Linux, type: package maps to the package executor (APT/DNF/etc.).

Notes

  • Package names depend on the backend. Use Chocolatey package names with choco, winget IDs with winget, and Scoop bucket names with scoop.
  • The executor uses where.exe to probe for available package managers.
  • Chocolatey operations include --no-progress to suppress progress bars. winget operations include --accept-source-agreements --accept-package-agreements.