npx skills add ...
npx skills add yoanbernabeu/grepai-skills --skill grepai-ollama-setup
Install and configure Ollama for local embeddings with GrepAI. Use this skill when setting up private, local embedding generation.
npx skills add yoanbernabeu/grepai-skills --skill grepai-ollama-setup
This skill covers installing and configuring Ollama as the local embedding provider for GrepAI. Ollama enables 100% private code search where your code never leaves your machine.
| Benefit | Description |
|---|---|
| ๐ Privacy | Code never leaves your machine |
| ๐ฐ Free | No API costs |
| โก Fast | Local processing, no network latency |
| ๐ Offline | Works without internet |
.dmg and drag to ApplicationsGrepAI requires an embedding model to convert code into vectors.
Specifications:
| Model | Dimensions | Size | Best For |
|---|---|---|---|
nomic-embed-text | 768 | 274 MB | General code search |
nomic-embed-text-v2-moe | 768 | 500 MB | Multilingual codebases |
bge-m3 | 1024 | 1.2 GB | Large codebases |
mxbai-embed-large | 1024 | 670 MB | Maximum accuracy |
After installing Ollama, configure GrepAI to use it:
This is the default configuration when you run grepai init, so no changes are needed if using nomic-embed-text.
Embedding models load into RAM:
nomic-embed-text: ~500 MB RAMbge-m3: ~1.5 GB RAMmxbai-embed-large: ~1 GB RAMOllama uses CPU by default. For faster embeddings:
โ Problem: connection refused to localhost:11434
โ
Solution: Start Ollama:
โ Problem: Model not found โ Solution: Pull the model first:
โ Problem: Slow embedding generation โ Solution:
ollama ps)โ Problem: Out of memory โ Solution: Use a smaller model or increase system RAM
ollama serve is runningnomic-embed-text offers best balanceollama pull nomic-embed-text for updatesAfter successful setup:
# Download the recommended model (768 dimensions)
ollama pull nomic-embed-text# Multilingual support (better for non-English code/comments)
ollama pull nomic-embed-text-v2-moe
# Larger, more accurate
ollama pull bge-m3
# Maximum quality
ollama pull mxbai-embed-large# Check if Ollama server is responding
curl http://localhost:11434/api/tags
# Expected output: JSON with available modelsollama list
# Output:
# NAME ID SIZE MODIFIED
# nomic-embed-text:latest abc123... 274 MB 2 hours ago# Quick test (should return embedding vector)
curl http://localhost:11434/api/embeddings -d '{
"model": "nomic-embed-text",
"prompt": "function hello() { return world; }"
}'# .grepai/config.yaml
embedder:
provider: ollama
model: nomic-embed-text
endpoint: http://localhost:11434# Run in current terminal (see logs)
ollama serve# Using nohup
nohup ollama serve &
# Or as a systemd service (Linux)
sudo systemctl enable ollama
sudo systemctl start ollama# Check if running
pgrep -f ollama
# Or test the API
curl -s http://localhost:11434/api/tags | head -1ollama serveollama pull nomic-embed-textโ
Ollama Setup Complete
Ollama Version: 0.1.x
Endpoint: http://localhost:11434
Model: nomic-embed-text (768 dimensions)
Status: Running
GrepAI is ready to use with local embeddings.
Your code will never leave your machine.