Modules@robinpath/supabase

@robinpath/supabase

0.1.0Public

Supabase module for RobinPath.

@robinpath/supabase

Supabase module for RobinPath.

Category Functions Auth License

Why use this module?

The supabase module lets you:

  • Select rows from a table with optional filters, ordering, and pagination
  • Insert one or more rows into a table
  • Update rows matching filters
  • Insert or update rows (merge on conflict)
  • Delete rows matching filters

All functions are callable directly from RobinPath scripts with a simple, consistent API.

Installation

npm install @robinpath/supabase

Quick Start

1. Set up credentials

supabase.setCredentials "https://xyz.supabase.co" "eyJhbGc..."

2. Store a service role key for admin operations (Auth admin, etc.)

supabase.setServiceKey "https://xyz.supabase.co" "eyJhbGc..."

Available Functions

FunctionDescription
supabase.setCredentialsStore Supabase project URL and anon/service API key
supabase.setServiceKeyStore a service role key for admin operations (Auth admin, etc.)
supabase.selectSelect rows from a table with optional filters, ordering, and pagination
supabase.insertInsert one or more rows into a table
supabase.updateUpdate rows matching filters
supabase.upsertInsert or update rows (merge on conflict)
supabase.deleteDelete rows matching filters
supabase.rpcCall a Postgres function via RPC
supabase.signUpSign up a new user with email and password
supabase.signInSign in a user with email and password
supabase.signInWithOtpSend a magic link to the user's email for passwordless sign in
supabase.signOutSign out a user by invalidating their access token
supabase.getUserGet the user object from a JWT access token
supabase.updateUserUpdate user attributes (email, password, metadata)
supabase.listUsersAdmin: List all users (requires service role key)
supabase.deleteUserAdmin: Delete a user by ID (requires service role key)
supabase.inviteUserAdmin: Invite a user by email (requires service role key)
supabase.listBucketsList all storage buckets
supabase.createBucketCreate a new storage bucket
supabase.deleteBucketDelete a storage bucket (must be empty first)
supabase.emptyBucketRemove all files from a storage bucket
supabase.listFilesList files in a storage bucket/folder
supabase.uploadFileUpload a file to a storage bucket
supabase.downloadFileDownload a file from a storage bucket
supabase.deleteFileDelete one or more files from a storage bucket
supabase.getPublicUrlGet the public URL for a file in a public bucket
supabase.createSignedUrlCreate a signed URL for temporary access to a private file

Examples

Store a service role key for admin operations (Auth admin, etc.)

supabase.setServiceKey "https://xyz.supabase.co" "eyJhbGc..."

Select rows from a table with optional filters, ordering, and pagination

supabase.select "users" "*" {"eq": {"status": "active"}, "limit": 10}

Insert one or more rows into a table

supabase.insert "users" {"name": "Alice", "email": "alice@example.com"}

Integration with RobinPath

import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/supabase";

const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);

const result = await rp.executeScript(`
  supabase.setCredentials "https://xyz.supabase.co" "eyJhbGc..."
  supabase.setServiceKey "https://xyz.supabase.co" "eyJhbGc..."
`);

Full API Reference

See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.

Related Modules

License

MIT

Versions (1)

VersionTagPublished
0.1.0latestyesterday
Install
$ robinpath install @robinpath/supabase
Version0.1.0
LicenseMIT
Unpacked Size10.1 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

Category

data