Skip to main content

Local-first RAG-lite CLI: condense docs into structured Markdown, then index/query with Chroma + hybrid search

Project description

RAGLite

RAGLite: Compress first. Index second.

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 🔎.

Core idea: compression-before-embeddings ✂️➡️🧠

RAGLite workflow: condense, index, query

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 index stores embeddings in Chroma 🧠 (one DB, many collections)
  • raglite query runs 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/responses endpoint for higher-quality, format-following condensation.
  • Ollama: uses POST /api/generate for 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

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-token or set OPENCLAW_GATEWAY_TOKEN.
  • Indexing defaults to high-signal artifacts (nodes/summaries/notes) and skips *.outline.md unless you opt in.

Roadmap

Current (implemented)

  • condense — condense/summarize documents into Markdown artifacts
  • index — chunk + embed + store in Chroma collections
  • query — retrieve relevant chunks (vector + keyword)
  • run — one-command pipeline (condense → index)
  • Outline + nodes + indices: --outline, --nodes, root index.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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

raglite_chromadb-1.0.1.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

raglite_chromadb-1.0.1-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

Details for the file raglite_chromadb-1.0.1.tar.gz.

File metadata

  • Download URL: raglite_chromadb-1.0.1.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for raglite_chromadb-1.0.1.tar.gz
Algorithm Hash digest
SHA256 08b8622e1d8026fea5b8f6bbce79f37ca87bae9f32059d4eea1efcb91947eee4
MD5 e0452e2fb9264e71ae6a085409106c09
BLAKE2b-256 c1b80e6a0d5bb0801d463b3a64a3f33ad33f59ea9fbeb9aa6ed59bb3efee3884

See more details on using hashes here.

Provenance

The following attestation bundles were made for raglite_chromadb-1.0.1.tar.gz:

Publisher: publish-pypi-prod.yml on VirajSanghvi1/raglite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file raglite_chromadb-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for raglite_chromadb-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5c040d1c79009fcab6152e75512df94d08f18ea1c2a301e6014a34bba057aef2
MD5 5a90a295f66b18cf9c54b72bf4f242d0
BLAKE2b-256 b3bf1766c83c57de2ae350e23019145c2cae2a77c133901005d008922ab930cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for raglite_chromadb-1.0.1-py3-none-any.whl:

Publisher: publish-pypi-prod.yml on VirajSanghvi1/raglite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page