supabase_get_current_user
Get the currently authenticated Supabase user profile information.
- Operation
- Read
read - Full name
supabase.supabase_get_current_user
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
other
Agent-facing Lua documentation and function reference for the Supabase KosmoKrator integration.
Agents call this integration through app.integrations.supabase.*.
Use lua_read_doc("integrations.supabase") inside KosmoKrator to discover the same reference at runtime.
This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.
List all Supabase projects in the organization.
None.
local result = app.integrations.supabase.list_projects({})
for _, project in ipairs(result) do
print(project.id .. ": " .. project.name .. " (" .. project.region .. ")")
end
Get details of a specific Supabase project.
| Name | Type | Required | Description |
|---|---|---|---|
project_ref | string | yes | The project reference ID |
local result = app.integrations.supabase.get_project({
project_ref = "my_project_ref"
})
print("Project: " .. result.name)
print("Region: " .. result.region)
print("Status: " .. result.status)
List all tables in a Supabase project.
| Name | Type | Required | Description |
|---|---|---|---|
project_ref | string | yes | The project reference ID |
local result = app.integrations.supabase.list_tables({
project_ref = "my_project_ref"
})
for _, table in ipairs(result) do
print(table.id .. ": " .. table.name)
end
Get details of a specific table in a project.
| Name | Type | Required | Description |
|---|---|---|---|
project_ref | string | yes | The project reference ID |
table_id | string | yes | The table ID |
local result = app.integrations.supabase.get_table({
project_ref = "my_project_ref",
table_id = "my_table_id"
})
print("Table: " .. result.name)
List rows in a Supabase table.
| Name | Type | Required | Description |
|---|---|---|---|
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") |
local result = app.integrations.supabase.list_rows({
project_ref = "my_project_ref",
table_name = "users",
limit = 10,
order = "created_at.desc"
})
for _, row in ipairs(result) do
print(row.id .. ": " .. (row.name or "unnamed"))
end
Get a single row by its ID.
| Name | Type | Required | Description |
|---|---|---|---|
project_ref | string | yes | The project reference ID |
table_name | string | yes | The table name or ID |
row_id | string | yes | The row ID |
local result = app.integrations.supabase.get_row({
project_ref = "my_project_ref",
table_name = "users",
row_id = "my_row_id"
})
for key, value in pairs(result) do
print(" " .. key .. " = " .. tostring(value))
end
Get the currently authenticated Supabase user profile.
None.
local result = app.integrations.supabase.get_current_user({})
print("User: " .. result.email)
If you have multiple Supabase accounts configured, use account-specific namespaces:
-- Default account (always works)
app.integrations.supabase.list_projects({})
-- Explicit default (portable across setups)
app.integrations.supabase.default.list_projects({})
-- Named accounts
app.integrations.supabase.production.list_projects({})
app.integrations.supabase.staging.list_projects({})
All functions are identical across accounts — only the credentials differ.
# Supabase — Lua API Reference
## list_projects
List all Supabase projects in the organization.
### Parameters
None.
### Example
```lua
local result = app.integrations.supabase.list_projects({})
for _, project in ipairs(result) do
print(project.id .. ": " .. project.name .. " (" .. project.region .. ")")
end
```
---
## get_project
Get details of a specific Supabase project.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_ref` | string | yes | The project reference ID |
### Example
```lua
local result = app.integrations.supabase.get_project({
project_ref = "my_project_ref"
})
print("Project: " .. result.name)
print("Region: " .. result.region)
print("Status: " .. result.status)
```
---
## list_tables
List all tables in a Supabase project.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_ref` | string | yes | The project reference ID |
### Example
```lua
local result = app.integrations.supabase.list_tables({
project_ref = "my_project_ref"
})
for _, table in ipairs(result) do
print(table.id .. ": " .. table.name)
end
```
---
## get_table
Get details of a specific table in a project.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_ref` | string | yes | The project reference ID |
| `table_id` | string | yes | The table ID |
### Example
```lua
local result = app.integrations.supabase.get_table({
project_ref = "my_project_ref",
table_id = "my_table_id"
})
print("Table: " .. result.name)
```
---
## list_rows
List rows in a Supabase table.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `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"`) |
### Example
```lua
local result = app.integrations.supabase.list_rows({
project_ref = "my_project_ref",
table_name = "users",
limit = 10,
order = "created_at.desc"
})
for _, row in ipairs(result) do
print(row.id .. ": " .. (row.name or "unnamed"))
end
```
---
## get_row
Get a single row by its ID.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_ref` | string | yes | The project reference ID |
| `table_name` | string | yes | The table name or ID |
| `row_id` | string | yes | The row ID |
### Example
```lua
local result = app.integrations.supabase.get_row({
project_ref = "my_project_ref",
table_name = "users",
row_id = "my_row_id"
})
for key, value in pairs(result) do
print(" " .. key .. " = " .. tostring(value))
end
```
---
## get_current_user
Get the currently authenticated Supabase user profile.
### Parameters
None.
### Example
```lua
local result = app.integrations.supabase.get_current_user({})
print("User: " .. result.email)
```
---
## Multi-Account Usage
If you have multiple Supabase accounts configured, use account-specific namespaces:
```lua
-- Default account (always works)
app.integrations.supabase.list_projects({})
-- Explicit default (portable across setups)
app.integrations.supabase.default.list_projects({})
-- Named accounts
app.integrations.supabase.production.list_projects({})
app.integrations.supabase.staging.list_projects({})
```
All functions are identical across accounts — only the credentials differ. local result = app.integrations.supabase.supabase_get_current_user({})
print(result) supabase_get_current_userGet the currently authenticated Supabase user profile information.
readsupabase.supabase_get_current_user| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
supabase_get_projectGet details of a specific Supabase project by its reference ID.
readsupabase.supabase_get_project| Parameter | Type | Required | Description |
|---|---|---|---|
project_ref | string | yes | The project reference ID. |
supabase_get_rowGet a single row from a Supabase table by its ID.
readsupabase.supabase_get_row| Parameter | Type | Required | Description |
|---|---|---|---|
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_get_settingsGet the OpenAPI spec info for the Supabase PostgREST instance. Returns database metadata, available tables, and schema information.
readsupabase.supabase_get_settings| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
supabase_get_tableGet details of a specific table in a Supabase project by its ID.
readsupabase.supabase_get_table| Parameter | Type | Required | Description |
|---|---|---|---|
project_ref | string | yes | The project reference ID. |
table_id | string | yes | The table ID. |
supabase_list_projectsList all Supabase projects in the organization. Returns project IDs, names, and regions.
readsupabase.supabase_list_projects| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
supabase_list_rowsList rows in a Supabase table. Returns row data and metadata.
readsupabase.supabase_list_rows| Parameter | Type | Required | Description |
|---|---|---|---|
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_list_tablesList all tables in a Supabase project. Returns table IDs, names, and schemas.
readsupabase.supabase_list_tables| Parameter | Type | Required | Description |
|---|---|---|---|
project_ref | string | yes | The project reference ID. |
supabase_query_with_filtersQuery 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} ]
readsupabase.supabase_query_with_filters| Parameter | Type | Required | Description |
|---|---|---|---|
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. |