Installation
This guide covers installation, configuration, and verification of Andi AIRun on all supported platforms.Supported Platforms
- macOS 13.0+
- Linux (Ubuntu 20.04+, Debian 10+)
- Windows 10+ via WSL
Prerequisites
Before installing AIRun, you need Claude Code installed on your system.Check if Claude Code is installed
Install AIRun
Run the setup script
- Install commands to
/usr/local/bin(may require sudo) - Create
~/.ai-runner/configuration directory - Copy
secrets.example.shto~/.ai-runner/secrets.sh - Install library scripts to
/usr/local/share/ai-runner - Migrate existing
~/.claude-switcher/configuration if present
The setup is non-destructive. Your plain
claude command always works untouched as before. All AIRun operations are session-scoped and automatically restore your original configuration on exit.Configure Providers
AIRun supports multiple AI providers. You only need to configure the providers you want to use.Open the secrets file
Configure your providers
Choose the providers you want to configure:
Local Providers (Free, No API Keys)
Local Providers (Free, No API Keys)
Ollama - Runs models locally or on Ollama’s cloud:LM Studio - Local models with MLX support (fast on Apple Silicon):
Hardware note: Coding models need 24GB+ VRAM (or unified memory on Apple Silicon). Ollama’s cloud models work on any hardware.
AWS Bedrock
AWS Bedrock
Google Vertex AI
Google Vertex AI
Add to Google Cloud Authentication (in precedence order):
~/.ai-runner/secrets.sh:-
Service Account Key File (highest precedence, recommended for production/CI):
-
Application Default Credentials (recommended for local development):
-
gcloud User Credentials (fallback):
Anthropic API
Anthropic API
Microsoft Azure
Microsoft Azure
Vercel AI Gateway
Vercel AI Gateway
Add to Get your token from the Vercel dashboard.Vercel AI Gateway supports 100+ models from OpenAI, xAI, Google, Meta, and more. See vercel.com/ai-gateway.
~/.ai-runner/secrets.sh:Verify Configuration
Check overall status
- Current tool and provider
- Authentication method
- Configured models
- Available providers
Test with your default provider
/status in Claude to verify the authentication method.Model Configuration (Optional)
AIRun uses sensible default models for each provider, but you can override them.Default Model Tiers
AIRun provides three model tiers:--opus/--high- Highest-tier model (Opus 4.6)--sonnet/--mid- Mid-tier model (Sonnet 4.6, default for cloud providers)--haiku/--low- Lowest-tier model (Haiku 4.5, fastest)
Override Default Models
To use different model versions, add overrides to~/.ai-runner/secrets.sh:
Dual Model Configuration
Claude Code uses two models:ANTHROPIC_MODEL- Main model for interactive workANTHROPIC_SMALL_FAST_MODEL- Background operations (defaults to Haiku)
Set Default Provider
Save your preferred provider and model as the default:Updating
AIRun checks for updates once every 24 hours (non-blocking) and shows a notice when a new version is available. Your API keys in~/.ai-runner/secrets.sh are preserved during updates.
Disable update checks by setting:
export AI_NO_UPDATE_CHECK=1 in your ~/.ai-runner/secrets.shTroubleshooting
Common Issues
Still getting rate limits after switching to API?
Still getting rate limits after switching to API?
- Verify API key:
grep ANTHROPIC_API_KEY ~/.ai-runner/secrets.sh - Confirm you’re using
ai(not plainclaude) - Run
ai-statusduring the session - In Claude, run
/statusto see authentication method
Switching back to Pro not working?
Switching back to Pro not working?
- Use
ai --proor plainclaude - Run
/statusin Claude to verify authentication
Local provider (Ollama/LM Studio) not connecting?
Local provider (Ollama/LM Studio) not connecting?
- Verify the server is running:
- Check the host configuration in
~/.ai-runner/secrets.sh - Ensure you have a model loaded
Permission errors during setup?
Permission errors during setup?
The setup script needs write access to The script will automatically request sudo access only if needed.
/usr/local/bin. If you see permission errors:Session-Scoped Behavior
ai with no flags uses your regular Claude subscription, identical to running claude directly. Provider flags (--aws, --ollama, etc.) only affect the current session:
- On exit, your original Claude settings are automatically restored
- Plain
claudein another terminal is completely unaffected - No global configuration is changed