Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@ragpipe/plugin-supabase

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ragpipe/plugin-supabase

Supabase pgvector vector store plugin for ragpipe

Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
29
61.11%
Maintainers
1
Weekly downloads
 
Created
Source

@ragpipe/plugin-supabase

Supabase pgvector vector store plugin for ragpipe.

Install

pnpm add ragpipe @ragpipe/plugin-supabase

Usage

import { defineConfig } from "ragpipe";
import { supabaseVectorStore } from "@ragpipe/plugin-supabase";

export default defineConfig({
  // ... embedding, generation
  vectorStore: supabaseVectorStore({
    databaseUrl: process.env.DATABASE_URL ?? "",
    tableName: "documents", // default
    dimensions: 3072,
  }),
});

API

supabaseVectorStore(options)

Returns a VectorStorePlugin backed by Supabase PostgreSQL with pgvector.

OptionTypeDefaultDescription
databaseUrlstringPostgreSQL connection string (required)
tableNamestring"documents"Table to store/query vectors
dimensionsnumberVector dimensions (for documentation; table must match)

Methods

MethodDescription
search(vector, topK)Cosine similarity search, returns top-K results with scores
upsert(source, content, vector)Insert a document if it doesn't already exist
clear()Truncate the documents table
disconnect()Close the PostgreSQL connection

Database Setup

Enable pgvector and create the documents table in your Supabase SQL editor:

CREATE EXTENSION IF NOT EXISTS vector;

CREATE TABLE documents (
  id BIGSERIAL PRIMARY KEY,
  source TEXT NOT NULL,
  content TEXT NOT NULL,
  vector VECTOR(3072)
);

CREATE INDEX ON documents
  USING ivfflat (vector vector_cosine_ops)
  WITH (lists = 100);

Adjust VECTOR(3072) to match your embedding model's dimensions.

License

MIT

Keywords

ragpipe

FAQs

Package last updated on 06 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts