Cross-platform package manager abstraction.
Detects the available system package manager and provides a consistent interface for installing, updating, querying, searching, removing, and getting info about packages.
Supported managers: apt, apt-get, dnf, yum, pacman, brew, apk, zypper, choco (Chocolatey), winget, pkg (FreeBSD), emerge (Gentoo).
Summary
Functions
Detects the first available package manager on the system.
Gets detailed info about an installed package.
Installs a package using the detected package manager. Runs non-interactively.
Returns true if the package is installed.
Removes/uninstalls a package.
Searches for a package by name or keyword.
Updates the package index/cache.
Types
Functions
@spec detect() :: package_manager()
Detects the first available package manager on the system.
Gets detailed info about an installed package.
Options
:manager— override detected package manager
Installs a package using the detected package manager. Runs non-interactively.
Options
:manager— override detected package manager
Returns true if the package is installed.
Removes/uninstalls a package.
Options
:manager— override detected package manager:purge— remove config files too (apt only)
Searches for a package by name or keyword.
Options
:manager— override detected package manager:exact— exact name match (apt-cache show vs apt-cache search)
Updates the package index/cache.