Not a dependency. Source code you own.

UnRAG

Install RAG as source files, not dependencies.
Two methods. Zero abstraction.

~/your-project
$ bunx unrag init
✓ Created unrag.config.ts
✓ Installed lib/unrag/core/*
✓ Installed lib/unrag/store/drizzle
✓ Installed lib/unrag/embedding/ai
Done. Your RAG module is ready.

The entire API

This is not a simplified example. This is the real thing.

your-app.ts
1import { createUnragEngine } from "@unrag/config";
2
3const engine = createUnragEngine();
4
5// Ingest: chunk → embed → store in Postgres
6await engine.ingest({
7 sourceId: "docs:readme",
8 content: "Your document content here...",
9});
10
11// Retrieve: embed query → similarity search
12const result = await engine.retrieve({
13 query: "How do I get started?",
14 topK: 5,
15});
16
17console.log(result.chunks);

Ready to own your RAG?

One command. A few hundred lines of code. Full control.

$bunx unrag init

Built with care. MIT Licensed. GitHub