Package installation and querying — via Arrea.Command.
For package manager detection use Apero.Packages directly.
All command execution is routed through Trebejo.Util with arg lists
— never interpolated into shell strings — to prevent shell injection.
Usage
# Install packages using the preferred manager:
Trebejo.Packages.install("nodejs")
# Install using a specific manager:
Trebejo.Packages.install(:apt, ["nodejs", "npm"])
# Check if installed:
Trebejo.Packages.installed?(:brew, "node")
Summary
Functions
Installs packages using the preferred (auto-detected) package manager.
Installs one or more packages using the specified manager.
Convenience: checks if a package is installed using the preferred manager.
Checks if a package is installed via the given manager.
Types
@type manager() ::
:apt
| :apt_get
| :brew
| :pacman
| :yum
| :dnf
| :apk
| :zypper
| :pkg
| :winget
| :choco
| :port
| :nix
@type package() :: String.t()
Functions
Installs packages using the preferred (auto-detected) package manager.
Installs one or more packages using the specified manager.
Returns :ok on success, {:error, reason} on failure.
Convenience: checks if a package is installed using the preferred manager.
Checks if a package is installed via the given manager.
Returns true or false.