Ask questions about your codebase in plain English. CodeRAG indexes your code and uses AI to provide accurate, cited answers.
# 1. Start Ollama (if not running)
ollama serve
# 2. Pull the model
ollama pull llama3
# 3. Start CodeRAG
docker-compose up
# 4. Open http://localhost:8000Via UI:
- Go to the Index tab
- Enter a GitHub URL or local path
- Click Start Indexing
Via API:
curl -X POST http://localhost:8000/api/v1/index \
-H "Content-Type: application/json" \
-d '{"repo_url": "https://github.com/user/repo"}'Via UI:
- Go to the Query tab
- Ask a question like "Where is authentication implemented?"
- Get AI-generated answers with source citations
Via API:
curl -X POST http://localhost:8000/api/v1/query \
-H "Content-Type: application/json" \
-d '{"query": "How does the login work?"}'- Index → Code is parsed, chunked by function/class, and embedded
- Search → Your question is matched against code using hybrid search
- Answer → AI generates a response with exact file:line citations
| Endpoint | Method | Description |
|---|---|---|
/api/v1/query |
POST | Query the codebase |
/api/v1/query/stream |
POST | Query with streaming response |
/api/v1/index |
POST | Index a repository |
/api/v1/index/status/{job_id} |
GET | Check indexing progress |
/api/v1/repos |
GET | List indexed repositories |
/api/v1/health |
GET | Health check |
Set via environment variables:
# LLM
CODERAG_LLM__PROVIDER=ollama
CODERAG_LLM__MODEL_NAME=llama3
CODERAG_LLM__BASE_URL=http://host.docker.internal:11434
# Embeddings
CODERAG_EMBEDDING__MODEL_NAME=all-MiniLM-L6-v2| Issue | Solution |
|---|---|
| "LLM not available" | Ensure Ollama is running: ollama serve |
| Slow first query | Model loading on first use—wait ~10s |
| No results | Check if repo is indexed in Index tab |
MIT


