一键导入
grepai-ollama-setup
Install and configure Ollama for local embeddings with GrepAI. Use this skill when setting up private, local embedding generation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Install and configure Ollama for local embeddings with GrepAI. Use this skill when setting up private, local embedding generation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Reference for all GrepAI MCP tools. Use this skill to understand available MCP tools and their parameters.
Advanced search options in GrepAI. Use this skill for JSON output, compact mode, and AI agent integration.
Find function callees with GrepAI trace. Use this skill to discover what functions a specific function calls.
Find function callers with GrepAI trace. Use this skill to discover what code calls a specific function.
Build complete call graphs with GrepAI trace. Use this skill for recursive dependency analysis.
Supported programming languages in GrepAI. Use this skill to understand which languages can be indexed and traced.
| name | grepai-ollama-setup |
| description | Install and configure Ollama for local embeddings with GrepAI. Use this skill when setting up private, local embedding generation. |
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 |
# Install Ollama
brew install ollama
# Start the Ollama service
ollama serve
.dmg and drag to Applications# One-line installer
curl -fsSL https://ollama.com/install.sh | sh
# Start the service
ollama serve
GrepAI requires an embedding model to convert code into vectors.
# Download the recommended model (768 dimensions)
ollama pull nomic-embed-text
Specifications:
# 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
| 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 |
# Check if Ollama server is responding
curl http://localhost:11434/api/tags
# Expected output: JSON with available models
ollama 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; }"
}'
After installing Ollama, configure GrepAI to use it:
# .grepai/config.yaml
embedder:
provider: ollama
model: nomic-embed-text
endpoint: http://localhost:11434
This is the default configuration when you run grepai init, so no changes are needed if using nomic-embed-text.
# 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 -1
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:
ollama serve
❌ Problem: Model not found ✅ Solution: Pull the model first:
ollama pull nomic-embed-text
❌ 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:
✅ 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.