Elia Project Overview
Introduction
Elia is a dynamic application designed for users who enjoy interacting with Large Language Models (LLMs) through their terminal windows. It embraces a keyboard-centric approach, providing a swift and enjoyable experience. What sets Elia apart is its ability to store conversations in a local SQLite database and facilitate interactions with a diverse range of models, including both proprietary solutions like ChatGPT and Claude, as well as local models available via Ollama or LocalAI.
Installation
The installation process for Elia is straightforward, using pipx
, a tool for executing Python applications in isolated environments. Users need Python 3.11 or later to install Elia:
pipx install --python 3.11 elia-chat
Depending upon the models you intend to use, it's necessary to set environment variables such as OPENAI_API_KEY
, ANTHROPIC_API_KEY
, or GEMINI_API_KEY
.
Quickstart Guide
Once installed, users can launch Elia straight from the command line to initiate a variety of chat sessions with different models:
- Standard launch:
elia
- Inline chat under the prompt:
elia -i "What is the Zen of Python?"
- Full-screen chat session:
elia "Tell me a cool fact about lizards!"
- Specify a model directly:
elia -m gpt-4o
- Combine options for a specific setup, for instance, using Gemini in inline mode:
elia -i -m gemini/gemini-1.5-flash-latest "How do I call Rust code from Python?"
Working with Local Models
Elia provides options for those interested in running local models:
- Install
Ollama
. - Download the required model, like
ollama pull llama3
. - Launch the local server with:
ollama serve
. - Add the model to Elia's configuration file.
Configuration
Elia users can utilize a configuration file to tailor their experience, spanning from default models to themes and additional models. This file, accessible via the options window (ctrl+o
), can also be used to set syntax highlighting preferences for coding in messages.
Custom Themes
Elia supports user-defined themes, allowing customization through YAML files added to the themes directory. Users can style their terminal interface by specifying colors for various interface elements, such as:
name: example
primary: '#4e78c4'
secondary: '#f39c12'
Keybindings
Keybindings in Elia are preset, though users can customize controls at the terminal emulator level. An example setup is shown using iTerm, mapping key combinations to send commands or messages.
Importing from ChatGPT
Users can also export their ChatGPT conversations to a JSON file and import them into Elia:
elia import 'path/to/conversations.json'
Database Management
Elia facilitates easy database management with simple commands for actions such as resetting the database:
elia reset
Uninstallation
Should users wish to remove Elia, the process can be easily accomplished:
pipx uninstall elia-chat
Elia stands out as a versatile tool for those who wish to explore the world of Large Language Models through an efficient and customizable terminal interface.