unrag
v0.3.3
Published
Unrag is a **RAG installer** for TypeScript projects that installs **composable, drop-in primitives** as source files you own.
Downloads
633
Readme
Unrag
Unrag is a RAG installer for TypeScript projects that installs composable, drop-in primitives as source files you own.
It installs small, auditable source files into your repo:
unrag.config.ts(project root)lib/unrag/**(or your chosen directory)- Optional:
lib/unrag/unrag.md(setup notes + schema, via--with-docs)
Usage
bunx unrag@latest initCommon flags
bunx unrag@latest init --yes --store drizzle --dir lib/unrag --alias @unrag--store:drizzle|prisma|raw-sql--dir: where to install the module code (defaultlib/unrag)--alias: import alias base (default@unrag) used to patchtsconfig.jsonin Next.js projects
After install
Import the engine from your project root config:
import { createUnragEngine } from "@unrag/config";Then use the primitives:
const engine = createUnragEngine();
await engine.ingest({ sourceId: "doc-1", content: "..." });
const result = await engine.retrieve({ query: "search", topK: 5 });Database
Unrag assumes Postgres + pgvector. You manage migrations yourself.
If you want generated schema notes, run unrag init --with-docs to create lib/unrag/unrag.md.
