一键导入
grepai-troubleshooting
// Troubleshooting guide for GrepAI. Use this skill to diagnose and fix common issues.
// Troubleshooting guide for GrepAI. Use this skill to diagnose and fix common issues.
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-troubleshooting |
| description | Troubleshooting guide for GrepAI. Use this skill to diagnose and fix common issues. |
This skill provides solutions for common GrepAI issues and diagnostic procedures.
Run these commands to understand your setup:
# Check GrepAI version
grepai version
# Check project status
grepai status
# Check Ollama (if using)
curl http://localhost:11434/api/tags
# Check config
cat .grepai/config.yaml
Symptom:
Error: Index not found. Run 'grepai watch' first.
Cause: No index has been created for this project.
Solution:
# Initialize if needed
grepai init
# Create the index
grepai watch
Symptom:
Error: Cannot connect to Ollama at http://localhost:11434
Causes:
Solutions:
ollama serve
embedder:
endpoint: http://localhost:11434 # Verify this
curl http://localhost:11434/api/tags
Symptom:
Error: Model 'nomic-embed-text' not found
Cause: The embedding model hasn't been downloaded.
Solution:
# Download the model
ollama pull nomic-embed-text
# Verify
ollama list
Symptom: Searches return empty or very few results.
Causes:
Solutions:
grepai status
# Should show files > 0 and chunks > 0
# Check ignore patterns in config
cat .grepai/config.yaml | grep -A 20 "ignore:"
grepai search "function" # Very broad test
Symptom: Results don't match what you're looking for.
Causes:
Solutions:
grepai-search-tips skill):# Bad
grepai search "auth"
# Good
grepai search "user authentication middleware"
search:
boost:
enabled: true
penalties:
- pattern: /tests/
factor: 0.5
grepai status
Symptom: Recent file changes aren't appearing in search results.
Causes:
Solutions:
grepai watch --status
grepai watch --stop
grepai watch --background
rm .grepai/index.gob
grepai watch
Symptom:
Error: Config file not found at .grepai/config.yaml
Cause: GrepAI not initialized in this directory.
Solution:
grepai init
Symptom: Initial indexing takes very long.
Causes:
Solutions:
ignore:
- node_modules
- vendor
- dist
- build
- "*.min.js"
embedder:
model: nomic-embed-text # Smaller, faster
embedder:
provider: openai
model: text-embedding-3-small
parallelism: 8
Symptom: Search queries take several seconds.
Causes:
Solutions:
ls -lh .grepai/index.gob
store:
backend: qdrant
grepai search "query" --limit 5
Symptom: grepai trace callers returns no results.
Causes:
Solutions:
Check exact function name (case-sensitive)
Enable language in config:
trace:
enabled_languages:
- .go
- .js
- .ts
rm .grepai/symbols.gob
grepai watch
Symptom: AI assistant can't use GrepAI tools.
Causes:
Solutions:
grepai mcp-serve
which grepai
# Claude Code
cat ~/.claude/mcp.json
# Cursor
cat .cursor/mcp.json
Symptom: GrepAI crashes or system becomes slow.
Causes:
Solutions:
embedder:
model: nomic-embed-text # Smaller
Use PostgreSQL or Qdrant instead of GOB
Reduce parallelism:
embedder:
parallelism: 2
Symptom:
Error: 401 Unauthorized - Invalid API key
Solutions:
echo $OPENAI_API_KEY
export OPENAI_API_KEY="sk-..."
embedder:
api_key: ${OPENAI_API_KEY} # Uses env var
#!/bin/bash
echo "=== GrepAI Diagnostics ==="
echo -e "\n1. Version:"
grepai version
echo -e "\n2. Status:"
grepai status
echo -e "\n3. Config:"
cat .grepai/config.yaml 2>/dev/null || echo "No config found"
echo -e "\n4. Index files:"
ls -la .grepai/ 2>/dev/null || echo "No .grepai directory"
echo -e "\n5. Ollama (if using):"
curl -s http://localhost:11434/api/tags | head -5 || echo "Ollama not responding"
echo -e "\n6. Daemon:"
grepai watch --status 2>/dev/null || echo "Daemon not running"
If all else fails, complete reset:
# Remove all GrepAI data
rm -rf .grepai
# Re-initialize
grepai init
# Start fresh index
grepai watch
If issues persist:
grepai version)Diagnostic summary:
🔍 GrepAI Diagnostics
Version: 0.24.0
Project: /path/to/project
✅ Config: Found (.grepai/config.yaml)
✅ Index: 245 files, 1,234 chunks
✅ Embedder: Ollama (connected)
✅ Daemon: Running (PID 12345)
❌ Issue: [Description if any]
Recommended actions:
1. [Action item]
2. [Action item]