Skip to content

Instantly share code, notes, and snippets.

@wilsonsilva
Last active February 26, 2026 05:47
Show Gist options
  • Select an option

  • Save wilsonsilva/65959f709ce52860b674d2ed585aacdd to your computer and use it in GitHub Desktop.

Select an option

Save wilsonsilva/65959f709ce52860b674d2ed585aacdd to your computer and use it in GitHub Desktop.
Update all AI CLI tools
brew upgrade mise # Mise
mise upgrade # Bun and other dependencies
bun add -g @google/gemini-cli # Gemini CLI
bun add -g @sourcegraph/amp@latest # AmpCode
bun add -g opencode-ai # OpenCode
bun add -g @github/copilot # Github Copilot CLI
claude update # Claude Code
agent update # Cursor CLI
omz update # Oh My Zsh
@wilsonsilva
Copy link
Copy Markdown
Author

Shell function:

update-ai-tools() {
  echo "🔄 Updating AI tools...\n"

  local steps=(
    "brew upgrade mise:Mise"
    "mise upgrade:Bun & dependencies"
    "bun add -g @google/gemini-cli:Gemini CLI"
    "bun add -g @sourcegraph/amp@latest:AmpCode"
    "bun add -g opencode-ai:OpenCode"
    "bun add -g @github/copilot:GitHub Copilot CLI"
    "claude update:Claude Code"
    "agent update:Cursor CLI"
    "omz update:Oh My Zsh"
  )

  for step in "${steps[@]}"; do
    local cmd="${step%%:*}"
    local label="${step##*:}"
    echo "📦 $label..."
    if eval "$cmd" > /dev/null 2>&1; then
      echo "$label updated"
    else
      echo "⚠️  $label failed (exit $?)"
    fi
  done

  echo "\n✨ Done!"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment