@robinpath/supabase
0.1.0PublicSupabase module for RobinPath.
@robinpath/supabase
Supabase module for RobinPath.
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
| Function | Description |
|---|---|
supabase.setCredentials | Store Supabase project URL and anon/service API key |
supabase.setServiceKey | Store a service role key for admin operations (Auth admin, etc.) |
supabase.select | Select rows from a table with optional filters, ordering, and pagination |
supabase.insert | Insert one or more rows into a table |
supabase.update | Update rows matching filters |
supabase.upsert | Insert or update rows (merge on conflict) |
supabase.delete | Delete rows matching filters |
supabase.rpc | Call a Postgres function via RPC |
supabase.signUp | Sign up a new user with email and password |
supabase.signIn | Sign in a user with email and password |
supabase.signInWithOtp | Send a magic link to the user's email for passwordless sign in |
supabase.signOut | Sign out a user by invalidating their access token |
supabase.getUser | Get the user object from a JWT access token |
supabase.updateUser | Update user attributes (email, password, metadata) |
supabase.listUsers | Admin: List all users (requires service role key) |
supabase.deleteUser | Admin: Delete a user by ID (requires service role key) |
supabase.inviteUser | Admin: Invite a user by email (requires service role key) |
supabase.listBuckets | List all storage buckets |
supabase.createBucket | Create a new storage bucket |
supabase.deleteBucket | Delete a storage bucket (must be empty first) |
supabase.emptyBucket | Remove all files from a storage bucket |
supabase.listFiles | List files in a storage bucket/folder |
supabase.uploadFile | Upload a file to a storage bucket |
supabase.downloadFile | Download a file from a storage bucket |
supabase.deleteFile | Delete one or more files from a storage bucket |
supabase.getPublicUrl | Get the public URL for a file in a public bucket |
supabase.createSignedUrl | Create 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
@robinpath/mysql— MySQL module for complementary functionality@robinpath/postgres— PostgreSQL module for complementary functionality@robinpath/mongo— Mongo module for complementary functionality@robinpath/redis— Redis module for complementary functionality@robinpath/firebase— Firebase module for complementary functionality
License
MIT
Versions (1)
| Version | Tag | Published |
|---|---|---|
| 0.1.0 | latest | yesterday |
Related Modules
@robinpath/chart
Generate chart images (PNG/JPEG) using Chart.js. Supports bar, line, pie, doughnut, scatter, radar, polarArea, and bubble charts with auto-coloring and customizable titles, legends, and dimensions.
@robinpath/firebase
Firebase module for RobinPath.
@robinpath/graph
Graph data structures with BFS, DFS, Dijkstra's shortest path, topological sort, cycle detection, and connectivity
@robinpath/hotjar
Hotjar module for RobinPath.
$ robinpath install @robinpath/supabase
