Last active
March 25, 2025 12:57
-
-
Save douglascayers/c1c77a69823534d31acc0f9ccabca97b to your computer and use it in GitHub Desktop.
⚡️ Update various CLI tools
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
source ~/.bashrc | |
# Update brew | |
# https://brew.sh | |
echo "Updating brew..." | |
brew update | |
brew upgrade | |
brew cleanup | |
# Update GitHub Copilot | |
gh extension upgrade gh-copilot | |
# Update global node modules | |
versions=($(nvm list --no-colors | grep -E "^(->)?(\s*)(v\d+)" | sed 's/->/ /g' | awk '{ print $1 }')) | |
for version in "${versions[@]}"; do | |
echo "Updating global node modules..." | |
nvm use ${version} | |
npm update --global --no-audit --no-fund | |
npm list --global --depth 0 | |
done | |
nvm use default | |
# Update python pip | |
versions=($(pyenv versions --bare)) | |
for version in "${versions[@]}"; do | |
echo "Updating python..." | |
pyenv shell ${version} | |
pip install --upgrade pip | |
done | |
pyenv shell system | |
# Update ruby aliases | |
rbenv alias --auto | |
# Update oh-my-zsh | |
# https://ohmyz.sh | |
echo "Updating oh-my-zsh" | |
$ZSH/tools/upgrade.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment