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
Recommended¶
- fzf: For fuzzy prompt searching
- git: For prompt management with version control
Installation Methods¶
Method 1: Install from RubyGems (Recommended)¶
The easiest way to install AIA is through RubyGems:
Method 2: Install from Source¶
If you want the latest development version:
Method 3: Using Bundler¶
Add to your Gemfile:
Then run:
Verify Installation¶
After installation, verify that AIA is working:
You should see the version number printed.
Initial Setup¶
1. Create Prompts Directory¶
AIA stores prompts in a directory (default: ~/.prompts
). Create it:
2. Create Configuration Directory¶
Create the configuration directory:
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¶
Anthropic Claude¶
Google Gemini¶
Ollama (Local models)¶
Add these to your shell profile (.bashrc
, .zshrc
, etc.) to make them permanent.
Optional Dependencies¶
Install fzf for Fuzzy Search¶
AIA supports fuzzy searching for prompts using fzf
. Install it:
macOS (using Homebrew)¶
Ubuntu/Debian¶
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¶
This will show all available AI models.
2. Test Basic Functionality¶
Create a simple prompt file:
Run it:
3. Test Chat Mode¶
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:
- Check the FAQ
- Search existing GitHub issues
- Create a new issue with:
- Your OS and Ruby version
- The exact error message
- Steps to reproduce
Next Steps¶
Once AIA is installed:
- Read the Configuration Guide
- Follow the Getting Started Guide
- Explore Examples
Updating AIA¶
To update to the latest version:
Or if installed from source: