Skip to main content
The ai update command updates your AI Runner installation to the latest version from the configured GitHub repository.

Syntax

What Gets Updated

When you run ai update, the following are updated:
1

Fetch Latest Version

Pulls the latest code from the configured GitHub repository (default: andisearch/airun)
2

Update Scripts

Installs updated scripts to /usr/local/bin:
  • ai / airun - main command
  • ai-sessions - session listing
  • ai-status - configuration status
  • Legacy claude-* commands for backward compatibility
3

Update Libraries

Updates shared libraries in /usr/local/share/ai-runner/:
  • lib/ - core utilities and loaders
  • providers/ - provider implementations
  • tools/ - tool integrations
4

Update Configuration

Updates configuration files in ~/.ai-runner/:
  • models.sh - default model IDs (with prompt before overwriting)
  • banner.sh - banner configuration
5

Preserve Secrets

Never touches your API keys and credentials:
  • ~/.ai-runner/secrets.sh - preserved unchanged
  • ~/.ai-runner/defaults.sh - preserved unchanged

Version Checking

AI Runner automatically checks for updates:
  • Frequency: Once every 24 hours (non-blocking, cache-only)
  • Where: Interactive mode startup and ai-status command
  • Notification: Shows a notice when a new version is available

Disable Update Checks

To disable automatic update checking:
Add to your shell profile (~/.bashrc, ~/.zshrc) to make permanent.

Manual Update

You can also update manually:
This is equivalent to running ai update.

What’s Preserved

The update process never modifies:
  • API keys and credentials in ~/.ai-runner/secrets.sh
  • Saved defaults in ~/.ai-runner/defaults.sh
  • Session data in ~/.ai-runner/sessions/
  • Claude configuration in ~/.claude/

Model Configuration Updates

When model defaults change between versions, you’ll be prompted:
  • Choose Y to update to new model defaults
  • Choose n to keep your current model configuration
Your model overrides in secrets.sh are always preserved.

Update Source

By default, ai update pulls from:
If you installed from a fork or custom source, the update command uses your configured git remote. Check your source:
Update source:

Version History

View release notes and version history:

Check Current Version

Or:

Rollback to Previous Version

If an update causes issues:

Update Behavior

The ai update command requires sudo access if /usr/local/bin is not writable by your user. You’ll be prompted for your password during the update.
Active sessions are not affected by updates. You can continue working in open ai sessions while updating.

Troubleshooting Updates

The update process needs to write to /usr/local/bin. Run with sudo or ensure the directory is writable:
Or make the directory writable:
AI Runner needs git to pull updates. Install git:
Verify you’re on the latest version:
Check if git pulled successfully:
Force reinstall:

ai --version

Show current version

ai-status

Check configuration (includes update status)