hisaac.net


Update All the Things

The other day, I was wishing for an easy way to update all of the CLI package managers on my computer at once, rather than having to type each command separately. Then I realized, this would be a great job for a bash/zsh alias!

Here's what I've come up with. I call it update-all-the-things:

alias update-all-the-things='
	echo "šŸŗ Updating Homebrew" ; brew upgrade ;
	echo "\nšŸ›¢ Updating Casks" ; brew cask upgrade ;
	echo "\nšŸš€ Updating Global Node Modules" ; npm update -g ;
	echo "\nšŸ’Ž Updating RubyGems" ; gem update ;
	echo "\nšŸ Updating pip" ;
		pip install --upgrade pip setuptools wheel ;
		pip freeze --local | grep -v "^-e" | cut -d = -f 1 | xargs pip install -U
	echo "\nšŸ‰ Updating pip3" ;
		pip3 install --upgrade pip setuptools wheel ;
		pip3 freeze --local | grep -v "^-e" | cut -d = -f 1 | xargs pip3 install -U
'

I think it would be fun to make this into an actual package itself someday. A super simple little Homebrew or NPM package would be fun to make. Have any ideas on how to implement it as its own package? Any package managers I'm missing? Let me know!

#tech #bash #mac