Skip to content

Installation

This guide will help you install AIA and get it running on your system.

Prerequisites

Required

  • Ruby: Version 3.0 or higher
  • RubyGems: Usually comes with Ruby
  • fzf: For fuzzy prompt searching
  • git: For prompt management with version control

Installation Methods

The easiest way to install AIA is through RubyGems:

gem install aia

Method 2: Install from Source

If you want the latest development version:

git clone https://github.com/MadBomber/aia.git
cd aia
bundle install
rake install

Method 3: Using Bundler

Add to your Gemfile:

gem 'aia'

Then run:

bundle install

Verify Installation

After installation, verify that AIA is working:

aia --version

You should see the version number printed.

Initial Setup

1. Create Prompts Directory

AIA stores prompts in a directory (default: ~/.prompts). Create it:

mkdir -p ~/.prompts

2. Create Configuration Directory

Create the configuration directory:

mkdir -p ~/.aia

3. Basic Configuration File (Optional)

Create a basic configuration file at ~/.aia/config.yml:

# Basic AIA configuration
adapter: ruby_llm
model: gpt-3.5-turbo
prompts_dir: ~/.prompts
temperature: 0.7
verbose: false

4. Set Up API Keys

AIA uses the RubyLLM gem, which supports multiple AI providers. Set up your API keys as environment variables:

OpenAI

export OPENAI_API_KEY="your_openai_api_key_here"

Anthropic Claude

export ANTHROPIC_API_KEY="your_anthropic_api_key_here"

Google Gemini

export GOOGLE_API_KEY="your_google_api_key_here"

Ollama (Local models)

export OLLAMA_URL="http://localhost:11434"

Add these to your shell profile (.bashrc, .zshrc, etc.) to make them permanent.

Optional Dependencies

AIA supports fuzzy searching for prompts using fzf. Install it:

macOS (using Homebrew)

brew install fzf

Ubuntu/Debian

apt-get install fzf

Other systems

See the fzf installation guide.

Install Additional Ruby Gems

Some features may require additional gems:

# For advanced audio processing
gem install ruby-audio

# For advanced image processing  
gem install mini_magick

# For enhanced terminal features
gem install tty-prompt

Testing Your Installation

1. Check Available Models

aia --available_models

This will show all available AI models.

2. Test Basic Functionality

Create a simple prompt file:

echo "Hello, what can you help me with today?" > ~/.prompts/hello.txt

Run it:

aia hello

3. Test Chat Mode

aia --chat

This should start an interactive chat session.

Troubleshooting

Common Issues

"Command not found: aia"

  • Make sure Ruby's bin directory is in your PATH
  • Try reinstalling: gem uninstall aia && gem install aia

"No models available"

  • Check that your API keys are set correctly
  • Verify your internet connection
  • Try: aia --available_models to diagnose

"fzf not found" warning

  • Install fzf as described above
  • Or disable fuzzy search: aia --no-fuzzy

Permission errors

  • Try installing with: gem install aia --user-install
  • Or use sudo (not recommended): sudo gem install aia

Getting Help

If you encounter issues:

  1. Check the FAQ
  2. Search existing GitHub issues
  3. Create a new issue with:
  4. Your OS and Ruby version
  5. The exact error message
  6. Steps to reproduce

Next Steps

Once AIA is installed:

  1. Read the Configuration Guide
  2. Follow the Getting Started Guide
  3. Explore Examples

Updating AIA

To update to the latest version:

gem update aia

Or if installed from source:

cd path/to/aia
git pull
bundle install
rake install