Skip to content

Update AI Agent CLIs

Update AI coding agent command-line tools to their latest versions.

Supported Agents

  • Claude Code — native binary, updated via claude update
  • Antigravity CLI — native binary, updated via agy update
  • OpenAI Codex@openai/codex
  • GitHub Copilot@github/copilot
  • Pi@mariozechner/pi-coding-agent

Native Binary Update Process (Claude Code and Antigravity CLI)

Both Claude Code and Antigravity CLI are native Go binaries with built-in updaters:

For Claude Code (claude):

  1. Check the current version by running claude --version
  2. Display "Current version of claude is x.y.z."
  3. Display "Updating..."
  4. Run claude update and show the live output
    • For any errors, show the full stderr output
  5. Check the new version after update
  6. Display one of:
    • "Claude Code was already up-to-date." (if version didn't change)
    • "Updated claude from x.y.z to a.b.c." (if version changed)

For Antigravity CLI (agy):

  1. Check the current version by running agy --version
  2. Display "Current version of agy is x.y.z."
  3. Display "Updating..."
  4. Run agy update and show the live output
    • For any errors, show the full stderr output
  5. Check the new version after update
  6. Display one of:
    • "Antigravity CLI was already up-to-date." (if version didn't change)
    • "Updated agy from x.y.z to a.b.c." (if version changed)

General Update Process (npm-based Agents)

For npm-based agent CLIs (Codex, Copilot, Pi):

  1. Check the current version by running {agent} --version
  2. Display "Current version of {agent} is x.y.z."
  3. Display "Updating..."
  4. Run volta install {package}@latest and show the live output
    • For any errors, show the full stderr output
  5. Check the new version after update
  6. Display one of:
    • "{Agent} was already up-to-date." (if version didn't change)
    • "Updated {agent} from x.y.z to a.b.c." (if version changed)

Why Volta (for non-Claude agents)?

This skill uses volta install instead of npm i -g for several important reasons:

  • CLI Agent Compatibility: Works reliably in automated and sandboxed environments where CLI agents operate
  • No ENOTEMPTY Errors: Volta's installation mechanism avoids the directory rename issues that can occur with npm global installs
  • Consistent Global Package Management: Volta ensures packages are installed correctly across all contexts (manual, automated, CLI agents)