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

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 ✂️➡️🧠

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.2.tar.gz (19.8 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.2-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

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

Hashes for raglite_chromadb-1.0.2.tar.gz
Algorithm Hash digest
SHA256 2502fe9ca9c13809c74e929064cd78cc913de5a6e1890289e06eac6bb8747c87
MD5 4a8123ad5a9820f70cd22ed6cc86d965
BLAKE2b-256 f6b14c2c772ae423105c1780e9c0f8d02d646a48e291de1c8848e121478ce720

See more details on using hashes here.

Provenance

The following attestation bundles were made for raglite_chromadb-1.0.2.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.2-py3-none-any.whl.

File metadata

File hashes

Hashes for raglite_chromadb-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f9ad1e4a143213a0714a715cfeb593d22e9d529e63e74b90b6763db5b3d2c85c
MD5 ad0585121eeb0f692d7369ed48c14730
BLAKE2b-256 88d16b976a0abf7d995fdc533455c9612a4734d53d85c8ffc7eea95e9f4fc2c0

See more details on using hashes here.

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

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