@hesed/supabase
v0.6.1
Published
CLI for Supabase API interaction
Readme
supabase
CLI for Supabase API interaction
Install
sdkck plugins install @hesed/supabaseUsage
$ npm install -g @hesed/supabase
$ spb COMMAND
running command...
$ spb (--version)
@hesed/supabase/0.6.1 linux-x64 node-v24.16.0
$ spb --help [COMMAND]
USAGE
$ spb COMMAND
...Commands
spb supabase auth addspb supabase auth deletespb supabase auth listspb supabase auth profilespb supabase auth testspb supabase auth updatespb supabase create TABLE DATAspb supabase delete TABLEspb supabase query TABLE SELECTspb supabase table-columns TABLEspb supabase tablesspb supabase update TABLE DATA
spb supabase auth add
Add Supabase authentication
USAGE
$ spb supabase auth add -p <value> -t <value> -e <value> -u <value> [--json]
FLAGS
-e, --email=<value> (required) Account email
-p, --profile=<value> (required) Profile name
-t, --apiToken=<value> (required) API Token
-u, --host=<value> (required) Supabase instance URL
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Add Supabase authentication
EXAMPLES
$ spb supabase auth add
$ spb supabase auth add -p prodSee code: src/commands/supabase/auth/add.ts
spb supabase auth delete
Delete an authentication profile
USAGE
$ spb supabase auth delete [--json] [-p <value>]
FLAGS
-p, --profile=<value> Profile to delete
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Delete an authentication profile
EXAMPLES
$ spb supabase auth delete
$ spb supabase auth delete -p prodSee code: src/commands/supabase/auth/delete.ts
spb supabase auth list
List authentication profiles
USAGE
$ spb supabase auth list [--json]
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List authentication profiles
EXAMPLES
$ spb supabase auth listSee code: src/commands/supabase/auth/list.ts
spb supabase auth profile
Set or show the default authentication profile
USAGE
$ spb supabase auth profile [--json] [--default <value>]
FLAGS
--default=<value> Profile to set as default
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Set or show the default authentication profile
EXAMPLES
$ spb supabase auth profile
$ spb supabase auth profile --default testSee code: src/commands/supabase/auth/profile.ts
spb supabase auth test
Test authentication and connection
USAGE
$ spb supabase auth test [--json] [-p <value>]
FLAGS
-p, --profile=<value> Authentication profile name
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Test authentication and connection
EXAMPLES
$ spb supabase auth test
$ spb supabase auth test -p prodSee code: src/commands/supabase/auth/test.ts
spb supabase auth update
Update Supabase authentication
USAGE
$ spb supabase auth update -p <value> -t <value> -e <value> -u <value> [--json]
FLAGS
-e, --email=<value> (required) Account email
-p, --profile=<value> (required) Profile name
-t, --apiToken=<value> (required) API Token
-u, --host=<value> (required) Supabase instance URL
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Update Supabase authentication
EXAMPLES
$ spb supabase auth update
$ spb supabase auth update -p testSee code: src/commands/supabase/auth/update.ts
spb supabase create TABLE DATA
Insert row(s) into a Supabase database table
USAGE
$ spb supabase create TABLE DATA [--json] [--format json|toon] [-p <value>] [--schema <value>] [--select <value>]
[--toon]
ARGUMENTS
TABLE Table name
DATA JSON object or array of objects to insert
FLAGS
-p, --profile=<value> Authentication profile name
--format=<option> [default: json] Output format
<options: json|toon>
--schema=<value> PostgREST schema name
--select=<value> Comma-separated columns to return after insert
--toon Format output as toon
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Insert row(s) into a Supabase database table
EXAMPLES
$ spb supabase create users '{"name":"Alice","email":"[email protected]"}'
$ spb supabase create users '[{"name":"Alice"},{"name":"Bob"}]'
$ spb supabase create products '{"name":"Widget","price":9.99}' --select id,nameSee code: src/commands/supabase/create.ts
spb supabase delete TABLE
Delete row(s) from a Supabase database table
USAGE
$ spb supabase delete TABLE --filters <value> [--json] [-p <value>] [--schema <value>] [--select <value>] [--toon]
ARGUMENTS
TABLE Table name
FLAGS
-p, --profile=<value> Authentication profile name
--filters=<value> (required) PostgREST filter string (e.g. "id=eq.42")
--schema=<value> PostgREST schema name
--select=<value> Comma-separated columns to return after delete
--toon Format output as toon
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Delete row(s) from a Supabase database table
EXAMPLES
$ spb supabase delete users --filters "id=eq.42"
$ spb supabase delete orders --filters "status=eq.cancelled&created_at=lt.2024-01-01"
$ spb supabase delete sessions --filters "user_id=eq.5" --select id
FLAG DESCRIPTIONS
--filters=<value> PostgREST filter string (e.g. "id=eq.42")
format: <column>=<operator>.<value>, combine multiple filters with & (AND)
comparison: eq, neq, gt, gte, lt, lte
pattern: like (case-sensitive, use * as wildcard), ilike (case-insensitive)
regex: match (~), imatch (~*)
list: in.(v1,v2), not.in.(v1,v2)
bool: is.null, is.true, is.false
logic: or=(col1.op.val,col2.op.val), not.<op>.<val>
array: cs.{v1,v2} (contains), cd.{v1,v2} (contained by)
full-text: fts.query, plfts.query, phfts.query, wfts.querySee code: src/commands/supabase/delete.ts
spb supabase query TABLE SELECT
Execute query on Supabase database table
USAGE
$ spb supabase query TABLE SELECT --filters <value> [--json] [--limit <value>] [-p <value>] [--schema <value>]
[--toon]
ARGUMENTS
TABLE Table name
SELECT Columns to return in the result
FLAGS
-p, --profile=<value> Authentication profile name
--filters=<value> (required) PostgREST filter string (e.g. "age=gte.18&status=eq.active")
--limit=<value> Max rows to return
--schema=<value> PostgREST schema name
--toon Format output as toon
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Execute query on Supabase database table
EXAMPLES
$ spb supabase query users first_name,last_name,email --filters "created_at=gt.2017-01-01"
$ spb supabase query users id,email --filters "age=gte.18&status=eq.active"
$ spb supabase query products name,price --filters "name=ilike.*phone*"
$ spb supabase query orders id,total --filters "status=in.(pending,processing)&total=gte.100"
$ spb supabase query posts id,title --filters "or=(author_id.eq.5,featured.is.true)"
$ spb supabase query events id,name --filters "tags=cs.{sale,featured}"
$ spb supabase query articles id,title --filters "body=fts.climate%20change"
FLAG DESCRIPTIONS
--filters=<value> PostgREST filter string (e.g. "age=gte.18&status=eq.active")
format: <column>=<operator>.<value>, combine multiple filters with & (AND)
comparison: eq, neq, gt, gte, lt, lte
pattern: like (case-sensitive, use * as wildcard), ilike (case-insensitive)
regex: match (~), imatch (~*)
list: in.(v1,v2), not.in.(v1,v2)
bool: is.null, is.true, is.false
logic: or=(col1.op.val,col2.op.val), not.<op>.<val>
array: cs.{v1,v2} (contains), cd.{v1,v2} (contained by)
full-text: fts.query, plfts.query, phfts.query, wfts.querySee code: src/commands/supabase/query.ts
spb supabase table-columns TABLE
List all columns in a table in Supabase database
USAGE
$ spb supabase table-columns TABLE [--json] [-p <value>] [--schema <value>] [--toon]
ARGUMENTS
TABLE Table name to get columns
FLAGS
-p, --profile=<value> Authentication profile name
--schema=<value> PostgREST schema name
--toon Format output as toon
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List all columns in a table in Supabase database
EXAMPLES
$ spb supabase table-columnsSee code: src/commands/supabase/table-columns.ts
spb supabase tables
List all tables in Supabase database
USAGE
$ spb supabase tables [--json] [-p <value>] [--schema <value>] [--toon]
FLAGS
-p, --profile=<value> Authentication profile name
--schema=<value> PostgREST schema name
--toon Format output as toon
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List all tables in Supabase database
EXAMPLES
$ spb supabase tablesSee code: src/commands/supabase/tables.ts
spb supabase update TABLE DATA
Update row(s) in a Supabase database table
USAGE
$ spb supabase update TABLE DATA --filters <value> [--json] [-p <value>] [--schema <value>] [--select <value>]
[--toon]
ARGUMENTS
TABLE Table name
DATA JSON object with fields to update
FLAGS
-p, --profile=<value> Authentication profile name
--filters=<value> (required) PostgREST filter string (e.g. "id=eq.42")
--schema=<value> PostgREST schema name
--select=<value> Comma-separated columns to return after update
--toon Format output as toon
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Update row(s) in a Supabase database table
EXAMPLES
$ spb supabase update users '{"status":"active"}' --filters "id=eq.42"
$ spb supabase update products '{"price":19.99}' --filters "name=eq.Widget" --select id,name,price
$ spb supabase update orders '{"status":"shipped"}' --filters "status=eq.pending&total=gte.100"
FLAG DESCRIPTIONS
--filters=<value> PostgREST filter string (e.g. "id=eq.42")
format: <column>=<operator>.<value>, combine multiple filters with & (AND)
comparison: eq, neq, gt, gte, lt, lte
pattern: like (case-sensitive, use * as wildcard), ilike (case-insensitive)
regex: match (~), imatch (~*)
list: in.(v1,v2), not.in.(v1,v2)
bool: is.null, is.true, is.false
logic: or=(col1.op.val,col2.op.val), not.<op>.<val>
array: cs.{v1,v2} (contains), cd.{v1,v2} (contained by)
full-text: fts.query, plfts.query, phfts.query, wfts.querySee code: src/commands/supabase/update.ts
