Installation Guide¶
Prerequisites¶
- Relevant API keys (for simplest setup, set
OPENAI_API_KEY
orANTHROPIC_API_KEY
) - Database, either:
- SQLite (sqlite-vec will be installed)
- PostgreSQL with pgvector extension
By default, Elroy will use SQLite. To add a custom DB, you can provide your database url either via the ELROY_DATABASE_URL
, the database_url
config value, or via the --database-url
startup flag.
Option 1: Using Install Script (Recommended)¶
This will: - Install uv if not already present - Install Python 3.12 if needed - Install Elroy in an isolated environment - Add Elroy to your PATH
This install script is based on Aider's installation script
Option 2: Using UV Manually¶
Prerequisites¶
- Python 3.10 or higher
- Database (SQLite or PostgreSQL with pgvector extension)
-
Relevant API keys (for simplest setup, set
OPENAI_API_KEY
orANTHROPIC_API_KEY
) -
Install UV:
-
Install and run Elroy:
Option 3: Using Docker¶
Prerequisites¶
- Docker and Docker Compose
This option automatically sets up everything you need, including the required PostgreSQL database with pgvector extension.
-
Download the docker-compose.yml:
-
Run Elroy:
# to ensure you have the most up to date image docker compose build --no-cache docker compose run --rm elroy # Add parameters as needed, e.g. here to use Anthropic's Sonnet model docker compose run --rm elroy --sonnet # Pass through all environment variables from host docker compose run --rm -e elroy # Or pass specific environment variable patterns docker compose run --rm -e "ELROY_*" -e "OPENAI_*" -e "ANTHROPIC_*" elroy
The Docker image is publicly available at ghcr.io/elroy-bot/elroy
.
Option 4: Installing from Source¶
Prerequisites¶
- Python 3.10 or higher
- uv package manager (install with
curl -LsSf https://astral.sh/uv/install.sh | sh
) - Relevant API keys (for simplest setup, set
OPENAI_API_KEY
orANTHROPIC_API_KEY
) - PostgreSQL database with pgvector extension
# Clone the repository
git clone --single-branch --branch stable https://github.com/elroy-bot/elroy.git
cd elroy
# Create virtual environment and install dependencies
uv venv
source .venv/bin/activate # On Unix/MacOS
# or
.venv\Scripts\activate # On Windows
# Install dependencies and the package
uv pip install -e .
# Run Elroy
elroy