A production-grade Local RAG CLI application that indexes and answers questions from notes, PDFs, and study materials completely offline.
- Fully local and offline inference using Ollama
- Intelligent text chunking and subject detection
- OCR support for scanned notes using Tesseract
- Persistent vector storage via ChromaDB
- CLI commands with Typer
- Python 3.12+
tesseractfor OCR (brew install tesseracton macOS,apt-get install tesseract-ocron Ubuntu)popplerfor PDF manipulation (brew install poppleron macOS,apt-get install poppler-utilson Ubuntu)- Ollama installed locally
- Setup the environment:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt- Make sure Ollama is running, and pull the default model:
ollama pull llama3- Ensure
aktu-ragis executable:
chmod +x aktu-ragPlace your PDFs and text files in the notes/ directory, then run:
./aktu-rag ingest ./notes./aktu-rag ask "Explain Banker's Algorithm"./aktu-rag list-docs./aktu-rag stats./aktu-rag rebuild-indexYou can run the app alongside Ollama using Docker Compose:
docker-compose up -d
docker-compose exec rag-app bash
# Then run commands inside the container
./aktu-rag ingest ./notes