-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Confidential local RAG for your coding agents. Ragmir indexes the project files you choose locally, keeps the corpus and index on your machine, and returns cited passages to agents and scripts through a CLI, TypeScript API, or local MCP server. The default local-hash path indexes and retrieves offline, with no account, API key, or model download.
Ragmir Core is model-agnostic and does not call a model or generate answers. Use the coding agent or script you already have, or pair retrieval with a local consumer when no passage may leave the workstation.
Ragmir requires Node.js 20 or later.
pnpm add -D @jcode.labs/ragmir
pnpm exec rgr setup --agents codex
pnpm exec rgr sources add "docs/**/*.md"
pnpm exec rgr ingest
pnpm exec rgr search "Which decision changed the rollout?"rgr setup creates ignored local state under .ragmir/. Search results include source paths, excerpts, chunk references, line ranges, and PDF pages when available.
Ingestion commits files in durable batches of 25 by default. If the process stops, run rgr ingest
again to resume from the last committed batch. Use rgr status --json to inspect the current run,
per-stage file counts, errors, and last activity.
| Interface | Use it for |
|---|---|
rgr CLI |
Setup, ingest, cited search, audit, and maintenance |
| TypeScript API | Reuse typed retrieval in a script or stateful Node.js worker |
| Local MCP server | Give coding agents bounded project evidence |
| Ragmir Chat | Generate cited answers with an optional local GGUF model |
| Ragmir TTS | Render local WAV audio or explicit online MP3 |
Installing Core does not install Chat or TTS. Both remain separate optional packages.
flowchart LR
A["Selected project files"] --> B["Extract and redact"]
B --> C["Chunk and index locally"]
C --> D["Cited passages"]
D --> E["CLI"]
D --> F["TypeScript API"]
D --> G["MCP coding agents and scripts"]
D -. optional .-> H["Local GGUF chat"]
The default local-hash retrieval path needs no account, hosted document store, or model download. Semantic embeddings, OCR, Chat, and TTS models are explicit optional setup steps.
rgr ingest --rebuild prepares a separate local index generation. The current healthy index stays
active until the replacement passes row-count, checksum, and duplicate-ID validation, then an
atomic manifest update activates it.
Ragmir does not open an HTTP port. Use the local stdio MCP server for coding agents, or embed one persistent TypeScript client per project root when a Node.js process owns the workflow. A network-facing host owns authentication, authorization, rate limits, and transport security.
- Getting Started
- Use Cases
- Agent Integration
- CLI Reference
- TypeScript API
- Configuration
- Security Hardening
- Offline Chat
- Offline TTS
- Troubleshooting
Start with Getting Started for a complete local setup and verification path. Continue with Use Cases for practical, privacy-aware workflows. The other pages are focused references for a specific interface or operational concern.
The repository documentation remains canonical. See the README, release history, and runnable examples for the current code-backed source.