GitHub - ats4321/ragit: Chat with any folder of documents using a local LLM — no API keys, no cloud. · GitHub
/" data-turbo-transient="true" />
Skip to content
Search or jump to...
Search code, repositories, users, issues, pull requests...
-->
Search
Clear
Search syntax tips
Provide feedback
--><br>We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Cancel
Submit feedback
Saved searches
Use saved searches to filter your results more quickly
-->
Name
Query
To see all available qualifiers, see our documentation.
Cancel
Create saved search
Sign in
/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up
Appearance settings
Resetting focus
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
ats4321
ragit
Public
Notifications<br>You must be signed in to change notification settings
Fork
Star
main
BranchesTags
Go to file
CodeOpen more actions menu
Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit
History<br>3 Commits<br>3 Commits
ragit
ragit
.gitignore
.gitignore
README.md
README.md
pyproject.toml
pyproject.toml
View all files
Repository files navigation
ragit
Local RAG CLI to chat with any folder of documents using Ollama.
Install
cd ~/ragit<br>python3 -m pip install -e .
If your default Python is 3.14+, use Python 3.10–3.13 (recommended: 3.12) because some<br>vector DB dependencies may not publish wheels for very new Python versions yet.
Make sure Ollama is installed and running:
ollama serve
Usage
Index a folder:
ragit index ./docs
Start chat:
ragit chat ./docs
List available Ollama models:
ragit models
Clear an index:
ragit clear ./docs
How it works
ragit implements Retrieval-Augmented Generation (RAG):
It loads supported documents (.txt, .md, .pdf, .docx) recursively.
It splits text into overlapping chunks (about 500 tokens with 50-token overlap).
It creates embeddings using Ollama (nomic-embed-text) and stores vectors in local ChromaDB at ~/.ragit//.
During chat, it embeds each query, retrieves the top relevant chunks, and injects them into a prompt.
It streams an answer from a local Ollama chat model (prefers llama3.2 if available), then shows source chunks used.
Security notes
All data stays local on your machine (Ollama + Chroma local persistence).
Indexes are stored under ~/.ragit//.
Files that cannot be parsed are skipped with a clear error message.
About
Chat with any folder of documents using a local LLM — no API keys, no cloud.
Topics
python
cli
rag
llm
chromadb
local-ai
ollama
Resources
Readme
Uh oh!
There was an error while loading. Please reload this page.
Activity
Stars
stars
Watchers
watching
Forks
forks
Report repository
Releases
No releases published
Packages
Uh oh!
There was an error while loading. Please reload this page.
Contributors
Uh oh!
There was an error while loading. Please reload this page.
Languages
Python<br>100.0%
You can’t perform that action at this time.