Killer Feature:
Start chatting with your data in seconds:minirag -docs=mydataThat's it. No setup, no config, just point to your folder and go!
MiniRAG is a single-binary, self-hosted chat webapp with Retrieval-Augmented Generation (RAG).
It runs as a single static binary on your machine—no cloud, no dependencies, no external services.
- Self-hosted: All data and LLM inference stay on your device.
- Single binary: Download, run, and you're ready—no Docker, no Python, no Node.js required.
- Private & secure: Your documents and chat never leave your computer.
MiniRAG is a lightweight, production-ready implementation of Retrieval-Augmented Generation (RAG) that combines the power of large language models with efficient document retrieval. Built with Go and React, it provides a modern, responsive interface for interacting with your documents.
brew tap komly/minirag
brew install miniragThen run:
minirag -docs=mydata- By default, MiniRAG will store its data in
~/.minirag. - You can specify a different data directory with the
-dataflag if needed. - The server will listen on
:7492by default. You can change this with the-httpflag.
- Document Indexing: Automatically indexes text documents with vector embeddings
- Smart Search: Uses semantic search to find relevant document chunks
- Chat Interface: Modern React-based chat UI with source attribution
- Ollama Integration: Works with any Ollama-compatible model
- Production Ready: Single binary deployment with embedded frontend
- Go 1.21 or later
- Node.js 18+ and pnpm
- Ollama running locally
- Text documents to index
minirag runs entirely locally on your machine:
- All LLM inference and document indexing happen on your computer.
- No data ever leaves your device.
- Your documents and chat history are never sent to any external server or cloud.
Your data stays private and secure.
-
Start the frontend development server:
cd backend/cmd/minirag/frontend pnpm dev -
In another terminal, start the backend:
cd backend go run cmd/minirag/main.go --dev
-
Build the frontend:
cd backend/cmd/minirag/frontend pnpm build -
Run the server:
cd backend go run cmd/minirag/main.go
--docs: Directory containing documents to index (default: "./docs")--data: Directory for storing index and metadata (default: "~/.minirag")--ollama-url: Ollama API URL (default: "http://127.0.0.1:11434")--ollama-model: Chat model name (default: "gemma3:12b")--ollama-embed-model: Embedding model name (default: "nomic-embed-text:latest")--http: HTTP listen address (default: ":7492", e.g. ":7492" or "0.0.0.0:7492")--dev: Run in development mode--force-reindex: Force reindexing of all documents
-
POST /chat: Chat with the system{ "query": "your question", "temperature": 0.7, "max_tokens": 1000 } -
POST /query: Search documents{ "query": "search term" } -
GET /debug/db: View database state
- React Vite TypeScript SPA
- Modern UI with responsive design
- Real-time chat interface
- Source attribution display
- Go application serving the frontend
- Vector database using chromem-go
- Integration with Ollama API
- Document processing and indexing
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- chromem-go for vector database
- Ollama for LLM integration
- React and Vite for frontend
The minirag binary supports the following flags:
| Flag | Default | Description |
|---|---|---|
-docs |
docs/ |
Path to the directory with documents to index and search. |
-data |
~/.minirag |
Path to the directory for storing vector DB and metadata. |
-http |
:7492 |
HTTP listen address (e.g. ':7492' or '0.0.0.0:7492'). |
-dev |
(off) | Enable development mode (useful for hot-reload and debugging). |
-force-reindex |
(off) | Force reindexing of all documents on startup, ignoring previous metadata. |
minirag -docs=app/ -data=~/.minirag -http=:8080-docs=app/— use theapp/directory for your documents.-data=~/.minirag— store all vector DB and metadata in the~/.miniragdirectory.-http=:8080— run the web server on port 8080.
Tip: You can combine flags as needed. If you omit a flag, the default value will be used.
