KosmoKrator

other

Supabase CLI for AI Agents

Use the Supabase CLI from KosmoKrator to call Supabase tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

9 functions 9 read 0 write Bearer token auth

Supabase CLI Setup

Supabase can be configured headlessly with `kosmokrator integrations:configure supabase`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure supabase --set access_token="$SUPABASE_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor supabase --json
kosmokrator integrations:status --json

Credentials

Authentication type: Bearer token bearer_token. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
access_token SUPABASE_ACCESS_TOKEN Secret secret yes Access Token
url SUPABASE_URL URL url no API URL

Call Supabase Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call supabase.supabase_get_current_user '{}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:supabase supabase_get_current_user '{}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs supabase --json
kosmo integrations:docs supabase.supabase_get_current_user --json
kosmo integrations:schema supabase.supabase_get_current_user --json
kosmo integrations:search "Supabase" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Supabase.

supabase.supabase_get_current_user

Read read

Get the currently authenticated Supabase user profile information.

Parameters
none

Generic CLI call

kosmo integrations:call supabase.supabase_get_current_user '{}' --json

Provider shortcut

kosmo integrations:supabase supabase_get_current_user '{}' --json

supabase.supabase_get_project

Read read

Get details of a specific Supabase project by its reference ID.

Parameters
project_ref

Generic CLI call

kosmo integrations:call supabase.supabase_get_project '{"project_ref":"example_project_ref"}' --json

Provider shortcut

kosmo integrations:supabase supabase_get_project '{"project_ref":"example_project_ref"}' --json

supabase.supabase_get_row

Read read

Get a single row from a Supabase table by its ID.

Parameters
project_ref, table_name, row_id

Generic CLI call

kosmo integrations:call supabase.supabase_get_row '{"project_ref":"example_project_ref","table_name":"example_table_name","row_id":"example_row_id"}' --json

Provider shortcut

kosmo integrations:supabase supabase_get_row '{"project_ref":"example_project_ref","table_name":"example_table_name","row_id":"example_row_id"}' --json

supabase.supabase_get_settings

Read read

Get the OpenAPI spec info for the Supabase PostgREST instance. Returns database metadata, available tables, and schema information.

Parameters
none

Generic CLI call

kosmo integrations:call supabase.supabase_get_settings '{}' --json

Provider shortcut

kosmo integrations:supabase supabase_get_settings '{}' --json

supabase.supabase_get_table

Read read

Get details of a specific table in a Supabase project by its ID.

Parameters
project_ref, table_id

Generic CLI call

kosmo integrations:call supabase.supabase_get_table '{"project_ref":"example_project_ref","table_id":"example_table_id"}' --json

Provider shortcut

kosmo integrations:supabase supabase_get_table '{"project_ref":"example_project_ref","table_id":"example_table_id"}' --json

supabase.supabase_list_projects

Read read

List all Supabase projects in the organization. Returns project IDs, names, and regions.

Parameters
none

Generic CLI call

kosmo integrations:call supabase.supabase_list_projects '{}' --json

Provider shortcut

kosmo integrations:supabase supabase_list_projects '{}' --json

supabase.supabase_list_rows

Read read

List rows in a Supabase table. Returns row data and metadata.

Parameters
project_ref, table_name, limit, offset, select, order

Generic CLI call

kosmo integrations:call supabase.supabase_list_rows '{"project_ref":"example_project_ref","table_name":"example_table_name","limit":1,"offset":1,"select":"example_select","order":"example_order"}' --json

Provider shortcut

kosmo integrations:supabase supabase_list_rows '{"project_ref":"example_project_ref","table_name":"example_table_name","limit":1,"offset":1,"select":"example_select","order":"example_order"}' --json

supabase.supabase_list_tables

Read read

List all tables in a Supabase project. Returns table IDs, names, and schemas.

Parameters
project_ref

Generic CLI call

kosmo integrations:call supabase.supabase_list_tables '{"project_ref":"example_project_ref"}' --json

Provider shortcut

kosmo integrations:supabase supabase_list_tables '{"project_ref":"example_project_ref"}' --json

supabase.supabase_query_with_filters

Read read

Query a Supabase table using advanced PostgREST filter operators. Provide filters as a JSON array of objects, each with "column", "operator", and "value" keys. Supported operators: eq, neq, gt, gte, lt, lte, like, ilike, in, is, cs, cd, ov, sl, sr, nxr, nxl, adj, not, or, and. Example filters_json: [ {"column": "status", "operator": "eq", "value": "active"}, {"column": "age", "operator": "gte", "value": 18} ]

Parameters
table, filters_json, select, order, limit

Generic CLI call

kosmo integrations:call supabase.supabase_query_with_filters '{"table":"example_table","filters_json":"example_filters_json","select":"example_select","order":"example_order","limit":1}' --json

Provider shortcut

kosmo integrations:supabase supabase_query_with_filters '{"table":"example_table","filters_json":"example_filters_json","select":"example_select","order":"example_order","limit":1}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

supabase.supabase_get_current_user

Get the currently authenticated Supabase user profile information.

Operation
Read read
Schema command
kosmo integrations:schema supabase.supabase_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

supabase.supabase_get_project

Get details of a specific Supabase project by its reference ID.

Operation
Read read
Schema command
kosmo integrations:schema supabase.supabase_get_project --json
ParameterTypeRequiredDescription
project_ref string yes The project reference ID.

supabase.supabase_get_row

Get a single row from a Supabase table by its ID.

Operation
Read read
Schema command
kosmo integrations:schema supabase.supabase_get_row --json
ParameterTypeRequiredDescription
project_ref string yes The project reference ID.
table_name string yes The table name or ID.
row_id string yes The row ID.

supabase.supabase_get_settings

Get the OpenAPI spec info for the Supabase PostgREST instance. Returns database metadata, available tables, and schema information.

Operation
Read read
Schema command
kosmo integrations:schema supabase.supabase_get_settings --json
ParameterTypeRequiredDescription
No parameters.

supabase.supabase_get_table

Get details of a specific table in a Supabase project by its ID.

Operation
Read read
Schema command
kosmo integrations:schema supabase.supabase_get_table --json
ParameterTypeRequiredDescription
project_ref string yes The project reference ID.
table_id string yes The table ID.

supabase.supabase_list_projects

List all Supabase projects in the organization. Returns project IDs, names, and regions.

Operation
Read read
Schema command
kosmo integrations:schema supabase.supabase_list_projects --json
ParameterTypeRequiredDescription
No parameters.

supabase.supabase_list_rows

List rows in a Supabase table. Returns row data and metadata.

Operation
Read read
Schema command
kosmo integrations:schema supabase.supabase_list_rows --json
ParameterTypeRequiredDescription
project_ref string yes The project reference ID.
table_name string yes The table name or ID.
limit integer no Maximum number of rows to return (default: 100).
offset integer no Offset for pagination (default: 0).
select string no Comma-separated list of columns to select.
order string no Column to order by, with optional direction (e.g. "id.desc").

supabase.supabase_list_tables

List all tables in a Supabase project. Returns table IDs, names, and schemas.

Operation
Read read
Schema command
kosmo integrations:schema supabase.supabase_list_tables --json
ParameterTypeRequiredDescription
project_ref string yes The project reference ID.

supabase.supabase_query_with_filters

Query a Supabase table using advanced PostgREST filter operators. Provide filters as a JSON array of objects, each with "column", "operator", and "value" keys. Supported operators: eq, neq, gt, gte, lt, lte, like, ilike, in, is, cs, cd, ov, sl, sr, nxr, nxl, adj, not, or, and. Example filters_json: [ {"column": "status", "operator": "eq", "value": "active"}, {"column": "age", "operator": "gte", "value": 18} ]

Operation
Read read
Schema command
kosmo integrations:schema supabase.supabase_query_with_filters --json
ParameterTypeRequiredDescription
table string yes Table name.
filters_json string yes JSON array of filter objects with "column", "operator", and "value" keys.
select string no Comma-separated column names (default "*").
order string no Order clause, e.g., "created_at.desc".
limit integer no Maximum number of rows to return.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.