Manages macOS development environments through declarative Brewfile configuration. Handles package installation, updates, cleanup, and environment synchronization using Homebrew bundle commands.
This skill helps you manage macOS development environments using Homebrew's bundle feature with a declarative Brewfile. It provides commands for installing packages, syncing environments, generating configurations, and maintaining system consistency.
When the user requests Homebrew environment management tasks, follow these steps:
First, recognize that this is a Brewfile-based environment repository with:
**Install/Update from Brewfile:**
```bash
brew bundle
```
Use this to install all packages defined in the Brewfile or update existing ones.
**Check Environment Sync:**
```bash
brew bundle check
```
Verifies that all packages in the Brewfile are installed. Returns exit code 0 if in sync.
**Generate Brewfile from Current Environment:**
```bash
brew bundle dump --describe --force
```
Creates a Brewfile from currently installed packages. `--describe` adds comments, `--force` overwrites existing file.
**Clean Up Unused Packages:**
```bash
brew bundle cleanup --dry-run
brew bundle cleanup
```
**Update All Packages:**
```bash
brew update && brew upgrade
```
Updates Homebrew itself and upgrades all installed packages.
For new environments, create the symlink:
```bash
ln -s $(pwd)/Brewfile ~/Brewfile
```
To install from a specific Brewfile location:
```bash
brew bundle --file=/path/to/Brewfile
```
The Brewfile contains three main entry types:
When modifying the Brewfile:
**User**: "Install all packages from the Brewfile"
**Action**: Run `brew bundle` and report installation results
**User**: "Check if my environment matches the Brewfile"
**Action**: Run `brew bundle check` and explain sync status
**User**: "Generate a new Brewfile from my current setup"
**Action**: Run `brew bundle dump --describe --force` and confirm generation
**User**: "Clean up packages not in the Brewfile"
**Action**: Run `brew bundle cleanup --dry-run` first to show preview, then ask for confirmation before running actual cleanup
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/homebrew-environment-manager-bq8oek/raw