Repository navigation
Home
Confidential local RAG for coding agents, scripts, and Node.js applications.
Ragmir turns specifications, Word files, PDFs, spreadsheets, code, and local exports into cited evidence indexed and retrieved on your machine. Core works offline by default, never uploads your corpus, and calls no model. Connect the AI or automation you already use through CLI, MCP, or a typed TypeScript API, or keep the complete workflow local with the optional Chat package.
Website · npm · Repository · Releases
Ragmir requires Node.js 22 or later. Install it in the project that owns the files to search:
pnpm add -D @jcode.labs/ragmir
pnpm exec rgr setup --agents codex,claude,kimi,opencode,cline
pnpm exec rgr sources add "README.md" "docs/**/*.md"
pnpm exec rgr ingest
pnpm exec rgr search "Which decision changed the rollout?"Using npm? Replace pnpm add -D with npm install --save-dev and pnpm exec with npx. At a
pnpm workspace root, use pnpm add -Dw.
rgr setup creates ignored local state under .ragmir/ and connects the selected agents.
Ingestion is incremental and resumable. Use rgr doctor to confirm readiness.
| Strength | What it gives you |
|---|---|
| Local by default | Corpus, index, reports, and metadata-only logs stay under ignored .ragmir/ state |
| Verifiable evidence | File and chunk references plus format-native source coordinates when available |
| Model-agnostic Core | Cited retrieval for compatible agents, scripts, CLI, MCP, and TypeScript |
| Production-grade ingestion | Bounded work, per-file durable progress, atomic rebuild activation, and local writer serialization |
| Inspectable retrieval | Hybrid ranking explanations, evidence thresholds, stable tie-breaks, and vector diagnostics |
| Open source | MIT packages, a static telemetry-free website, and no hosted Ragmir account |
The default local-hash provider needs no model download. Semantic Transformers.js embeddings,
local OCR, Chat, and TTS are explicit optional setup steps.
flowchart LR
A["Project files you choose"] --> B["Extract and redact"]
B --> C["Chunk and index locally"]
C --> D["Retrieve bounded evidence"]
D --> E["CLI"]
D --> F["TypeScript"]
D --> G["MCP agent"]
D -. optional .-> H["Local Chat or audio"]
B -. blank PDF pages .-> I["Configured local OCR"]
Ragmir opens no HTTP port. A network-facing application owns transport security, authentication, authorization, and rate limits.
| Interface | Best for |
|---|---|
rgr CLI |
Setup, ingest, cited search, audit, and maintenance |
| TypeScript API | Scripts and long-running Node.js workers |
| Local MCP server | Coding agents and compatible clients |
| Ragmir Chat | Optional fully local answer generation |
| Ragmir TTS | Local WAV or explicit online MP3 from reviewed text |
Core remains retrieval-first: ask() returns cited context, not a generated answer. Chat and TTS
are separate optional packages loaded only when their commands are used.
flowchart LR
A["Shared source folder"] --> B["Versioned source contract"]
B --> C["Local ingest per developer"]
C --> D["Ready index"]
D --> E["Export team snapshot"]
E --> F["Compare and resolve exact drift"]
Teams use Git, Drive, or their existing file workflow to synchronize one source of truth, then
build one local index per developer. rgr team snapshot exports authorized metadata without source
text or absolute project paths. rgr team compare names version, configuration, local-only,
peer-only, and changed-file drift, then gives ordered repair steps. Ragmir never guesses which copy
is authoritative.
After updating Ragmir, run rgr upgrade --check, then rgr upgrade when required. Any incompatible
replacement is built and validated separately before atomic activation; the previous valid index is
never deleted first.
- Getting Started
- Use Cases
- Agent Integration
- CLI Reference
- TypeScript API
- Configuration
- Security Hardening
- Offline Chat
- Offline TTS
- Troubleshooting
Start with Getting Started, then choose the focused guide for your interface or operational concern. The repository remains canonical for the complete README, API reference, examples, and release history.