brew
brew¶
Manage brew packages on mac/OSX. See https://brew.sh/
cask_upgrade()
¶
Upgrades all brew casks.
casks(casks=None, present=True, latest=False, upgrade=False)
¶
Add/remove/update brew casks.
- casks: list of casks to ensure
- present: whether the casks should be installed
- latest: whether to upgrade casks without a specified version
- upgrade: run brew cask upgrade before installing casks
Versions
Cask versions can be pinned like brew: <pkg>@<version>
.
Example:
.. code:: python
brew.casks(
name='Upgrade and install the latest cask',
casks=["godot"],
upgrade=True,
latest=True,
)
packages(packages=None, present=True, latest=False, update=False, upgrade=False)
¶
Add/remove/update brew packages.
- packages: list of packages to ensure
- present: whether the packages should be installed
- latest: whether to upgrade packages without a specified version
- update: run
brew update
before installing packages - upgrade: run
brew upgrade
before installing packages
Versions
Package versions can be pinned like brew: <pkg>@<version>
.
Examples:
.. code:: python
# Update package list and install packages
brew.packages(
name='Install Vim and vimpager',
packages=["vimpager", "vim"],
update=True,
)
# Install the latest versions of packages (always check)
brew.packages(
name="Install latest Vim",
packages=["vim"],
latest=True,
)
tap(src, present=True)
¶
Add/remove brew taps.
- src: the name of the tap
- present: whether this tap should be present or not
Examples:
.. code:: python
brew.tap(
name="Add a brew tap",
src="includeos/includeos",
)
# Multiple taps
for tap in ["includeos/includeos", "ktr0731/evans"]:
brew.tap(
name={f"Add brew tap {tap}"},
src=tap,
)
update()
¶
Updates brew repositories.
upgrade()
¶
Upgrades all brew packages.