Local-first RAG-lite CLI: condense docs into structured Markdown, then index/query with Chroma + hybrid search
Project description
RAGLite
RAGLite is a local-first CLI that turns a folder of docs (PDF/HTML/TXT/MD) into structured, low-fluff Markdown — and then makes it searchable with Chroma 🧠 + ripgrep 🔎.
Security note (prompt injection)
RAGLite treats extracted document text as untrusted data. If you distill content from the web (or any third party), assume it may contain prompt injection attempts. The distillation prompts explicitly instruct the model to ignore any instructions inside source material and treat sources as data only.
Core idea: compression-before-embeddings ✂️➡️🧠
What you get
For each input file:
*.execution-notes.md— practical run/operate notes (checks, failure modes, commands)*.tool-summary.md— compact index entry (purpose, capabilities, entrypoints, footguns)
Optionally:
raglite indexstores embeddings in Chroma 🧠 (one DB, many collections)raglite queryruns hybrid search 🔎 (vector + keyword)
Why local + open-source?
If you want a private, local setup (no managed “fancy vector DB” required), RAGLite keeps everything on your machine:
- Distilled Markdown artifacts are plain files you can audit + version control
- Indexing uses Chroma (open-source, local) and keyword search uses ripgrep
- You can still swap in a hosted vector DB later if you outgrow local
Engines
RAGLite supports two backends:
- OpenClaw (recommended): uses your local OpenClaw Gateway
/v1/responsesendpoint for higher-quality, format-following condensation. - Ollama: uses
POST /api/generatefor fully local inference (often less reliable at strict templates).
Prereqs
- Python 3.11+
- An LLM engine:
- OpenClaw (recommended) 🦞, or
- Ollama 🦙
- For search:
- Chroma (open-source, local) 🧠 at
http://127.0.0.1:8100
- Chroma (open-source, local) 🧠 at
Install
# from repo root
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
Quickstart (60s)
# 0) Setup
cd ~/Projects/raglite
source .venv/bin/activate
# 1) Condense → Index (one command)
raglite run /path/to/docs \
--out ./raglite_out \
--engine ollama --ollama-model llama3.2:3b \
--collection my-docs \
--chroma-url http://127.0.0.1:8100 \
--skip-indexed
# 2) Query
raglite query ./raglite_out \
--collection my-docs \
"rollback procedure"
Usage
1) Distill docs ✍️
raglite condense /path/to/docs \
--out ./raglite_out \
--engine openclaw
(Or fully local: --engine ollama --ollama-model llama3.2:3b.)
2) Index distilled output (Chroma)
raglite index ./raglite_out \
--collection my-docs \
--chroma-url http://127.0.0.1:8100
3) Query (hybrid)
raglite query ./raglite_out \
--collection my-docs \
--top-k 5 \
--keyword-top-k 5 \
"rollback procedure"
Useful flags
--skip-existing: don’t redo files that already have both outputs--skip-indexed: don’t re-embed chunks that are already indexed--nodes: write per-section nodes + per-doc/root indices--node-max-chars 1200: keep nodes embed-friendly--sleep-ms 200: throttle between files (helps avoid timeouts)--max-chars 180000: cap extracted text per file before summarizing
Output layout
RAGLite preserves folder structure under your --out dir:
<out>/
some/subdir/file.execution-notes.md
some/subdir/file.tool-summary.md
(Default output folder is `./raglite_out`.)
Notes / gotchas
- PDF extraction is best-effort: scanned PDFs without embedded text won’t be great.
- If you use
--engine openclaw, pass--gateway-tokenor setOPENCLAW_GATEWAY_TOKEN. - Indexing defaults to high-signal artifacts (nodes/summaries/notes) and skips
*.outline.mdunless you opt in.
Roadmap
Current (implemented)
condense— condense/summarize documents into Markdown artifactsindex— chunk + embed + store in Chroma collectionsquery— retrieve relevant chunks (vector + keyword)run— one-command pipeline (condense → index)- Outline + nodes + indices:
--outline,--nodes, rootindex.md+ per-doc*.index.md
Next (near-term)
- Detect deletions (prune removed chunks from Chroma)
- Batch upserts to Chroma for speed
- Better query output formatting (snippets + anchors)
raglite doctor(dependency checks)
(Full: ROADMAP.md)
Built to turn “docs” into usable, searchable tool knowledge.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file raglite_chromadb-1.0.2.tar.gz.
File metadata
- Download URL: raglite_chromadb-1.0.2.tar.gz
- Upload date:
- Size: 19.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2502fe9ca9c13809c74e929064cd78cc913de5a6e1890289e06eac6bb8747c87
|
|
| MD5 |
4a8123ad5a9820f70cd22ed6cc86d965
|
|
| BLAKE2b-256 |
f6b14c2c772ae423105c1780e9c0f8d02d646a48e291de1c8848e121478ce720
|
Provenance
The following attestation bundles were made for raglite_chromadb-1.0.2.tar.gz:
Publisher:
publish-pypi-prod.yml on VirajSanghvi1/raglite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
raglite_chromadb-1.0.2.tar.gz -
Subject digest:
2502fe9ca9c13809c74e929064cd78cc913de5a6e1890289e06eac6bb8747c87 - Sigstore transparency entry: 929454245
- Sigstore integration time:
-
Permalink:
VirajSanghvi1/raglite@dcf1a9bbbd1d82faa798e31de69f890e5dc582c2 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/VirajSanghvi1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi-prod.yml@dcf1a9bbbd1d82faa798e31de69f890e5dc582c2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file raglite_chromadb-1.0.2-py3-none-any.whl.
File metadata
- Download URL: raglite_chromadb-1.0.2-py3-none-any.whl
- Upload date:
- Size: 19.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9ad1e4a143213a0714a715cfeb593d22e9d529e63e74b90b6763db5b3d2c85c
|
|
| MD5 |
ad0585121eeb0f692d7369ed48c14730
|
|
| BLAKE2b-256 |
88d16b976a0abf7d995fdc533455c9612a4734d53d85c8ffc7eea95e9f4fc2c0
|
Provenance
The following attestation bundles were made for raglite_chromadb-1.0.2-py3-none-any.whl:
Publisher:
publish-pypi-prod.yml on VirajSanghvi1/raglite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
raglite_chromadb-1.0.2-py3-none-any.whl -
Subject digest:
f9ad1e4a143213a0714a715cfeb593d22e9d529e63e74b90b6763db5b3d2c85c - Sigstore transparency entry: 929454287
- Sigstore integration time:
-
Permalink:
VirajSanghvi1/raglite@dcf1a9bbbd1d82faa798e31de69f890e5dc582c2 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/VirajSanghvi1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi-prod.yml@dcf1a9bbbd1d82faa798e31de69f890e5dc582c2 -
Trigger Event:
push
-
Statement type: