Skip to main content

AI-Powered Change Summaries

Eko provides intelligent, automated change summaries for your snapshot points using LLM providers (Google Gemini, OpenAI, or local heuristic engines).


🔑 Setting Up API Keys

To enable AI change summaries, export your preferred API key in your terminal environment.

Get an API key from Google AI Studio.

macOS / Linux (Bash & Zsh):

export GEMINI_API_KEY="your-gemini-api-key-here"

Windows (PowerShell):

$env:GEMINI_API_KEY="your-gemini-api-key-here"

Windows (Command Prompt):

set GEMINI_API_KEY="your-gemini-api-key-here"

2. OpenAI / Custom LLM (vLLM / Ollama)

Get an API key from OpenAI Platform.

macOS / Linux:

export OPENAI_API_KEY="your-openai-api-key-here"

# (Optional) Custom base URL for local LLMs like Ollama or vLLM:
export EKO_AI_ENDPOINT="http://localhost:11434/v1"

3. Permanent Setup (Shell Profile)

To keep your API key active across terminal restarts, add it to your shell profile (~/.zshrc or ~/.bashrc):

echo 'export GEMINI_API_KEY="your-gemini-api-key-here"' >> ~/.zshrc
source ~/.zshrc

🚀 Generating Summaries

Auto-Generate Summary When Saving a Snapshot

eko save --ai

Output:

Snapshot saved: 8c9d1a2f
AI Summary: Added user authentication endpoint and updated SQLite database migration logic.

Summarize Latest Snapshot

eko summary

Summarize Specific Snapshot

eko summary 3b7f2a1e

Summarize Differences Between Two Snapshots

eko summary 3b7f2a1e 8c9d1a2f

Force a Specific Provider

eko summary 3b7f2a1e --provider gemini
eko summary 3b7f2a1e --provider openai
eko summary 3b7f2a1e --provider heuristic

⚙️ AI Provider Options

ProviderFlagDescriptionCredentials Required
Auto-p autoAuto-detects Gemini or OpenAI key; falls back to Heuristic engineNone (fallback)
Gemini-p geminiGoogle Gemini 1.5 Flash modelGEMINI_API_KEY
OpenAI-p openaiOpenAI GPT-4o-mini / custom LLMOPENAI_API_KEY or EKO_AI_API_KEY
Heuristic-p heuristicLocal rule-based fast analysisNone (offline)

Configuration Environment Variables

Environment VariableDefault ValueDescription
GEMINI_API_KEY(None)Google Gemini API key
OPENAI_API_KEY(None)OpenAI API key
EKO_AI_API_KEY(None)Alternative key for AI provider
EKO_AI_ENDPOINThttps://api.openai.com/v1Custom OpenAI-compatible REST endpoint
EKO_AI_MODELgpt-4o-mini / gemini-1.5-flashCustom model name override