productivity
Ko-fi Lua API for KosmoKrator Agents
Agent-facing Lua documentation and function reference for the Ko-fi KosmoKrator integration.Lua Namespace
Agents call this integration through app.integrations.ko_fi.*.
Use lua_read_doc("integrations.ko-fi") inside KosmoKrator to discover the same reference at runtime.
Call Lua from the Headless CLI
Use kosmo integrations:lua when a shell script, CI job, cron job, or another coding CLI should run a deterministic
Ko-fi workflow without starting an interactive agent session.
kosmo integrations:lua --eval 'dump(app.integrations.ko_fi.list_supporters({page = 1, limit = 1}))' --json kosmo integrations:lua --eval 'print(docs.read("ko-fi"))' --json
kosmo integrations:lua --eval 'print(docs.read("ko-fi.list_supporters"))' --json Workflow file
Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.
local ko_fi = app.integrations.ko_fi
local result = ko_fi.list_supporters({page = 1, limit = 1})
dump(result) kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json integrations:lua exposes app.integrations.ko_fi, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.ko_fi.default.* or app.integrations.ko_fi.work.* when you configured named credential accounts.
MCP-only Lua
If the script only needs configured MCP servers and does not need Ko-fi, use the narrower mcp:lua command.
# Use mcp:lua for MCP-only scripts; use integrations:lua for this integration namespace.
kosmo mcp:lua --eval 'dump(mcp.servers())' --json Agent-Facing Lua Docs
This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.
Ko-fi — Lua API Reference
list_supporters
List all supporters who have donated or subscribed to your Ko-fi page.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number for pagination (default: 1) |
limit | integer | no | Number of results per page (default: 25) |
Examples
local result = app.integrations["ko-fi"].list_supporters()
for _, supporter in ipairs(result.supporters) do
print(supporter.name .. " — " .. supporter.email)
end
Paginated results
local result = app.integrations["ko-fi"].list_supporters({
page = 2,
limit = 10
})
print("Total supporters on page: " .. result.totalCount)
get_supporter
Get detailed information about a single Ko-fi supporter.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
email | string | yes | The email address of the supporter to retrieve |
Example
local result = app.integrations["ko-fi"].get_supporter({
email = "fan@example.com"
})
print(result.name)
print(result.total_donated)
print(result.status)
list_transactions
List all transactions including donations, subscriptions, and shop orders.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
type | string | no | Filter by type: donation, subscription, or shop_order |
page | integer | no | Page number for pagination (default: 1) |
limit | integer | no | Number of results per page (default: 25) |
Examples
All recent transactions
local result = app.integrations["ko-fi"].list_transactions()
for _, tx in ipairs(result.transactions) do
print(tx.type .. " — $" .. tx.amount .. " — " .. tx.supporter_name)
end
Filter by type
local result = app.integrations["ko-fi"].list_transactions({
type = "donation"
})
print("Donation count: " .. result.totalCount)
list_commissions
List all commission requests on your Ko-fi page.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
status | string | no | Filter by status: pending, accepted, completed, or declined |
page | integer | no | Page number for pagination (default: 1) |
limit | integer | no | Number of results per page (default: 25) |
Examples
All commissions
local result = app.integrations["ko-fi"].list_commissions()
for _, commission in ipairs(result.commissions) do
print(commission.title .. " — " .. commission.status .. " — $" .. commission.price)
end
Pending commissions only
local result = app.integrations["ko-fi"].list_commissions({
status = "pending"
})
get_commission
Get details for a single commission.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
commission_id | string | yes | The ID of the commission to retrieve |
Example
local result = app.integrations["ko-fi"].get_commission({
commission_id = "COM123"
})
print(result.title)
print(result.description)
print(result.status)
print(result.requester_name)
list_shop_items
List all items in your Ko-fi shop.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number for pagination (default: 1) |
limit | integer | no | Number of results per page (default: 25) |
Examples
local result = app.integrations["ko-fi"].list_shop_items()
for _, item in ipairs(result.items) do
print(item.name .. " — $" .. item.price)
end
get_current_user
Get the profile of the currently authenticated Ko-fi user.
Parameters
None.
Example
local result = app.integrations["ko-fi"].get_current_user()
print("Connected as: " .. result.name)
print("Email: " .. result.email)
Multi-Account Usage
If you have multiple Ko-fi accounts configured, use account-specific namespaces:
-- Default account (always works)
app.integrations["ko-fi"].function_name({...})
-- Explicit default (portable across setups)
app.integrations["ko-fi"].default.function_name({...})
-- Named accounts
app.integrations["ko-fi"].main_page.function_name({...})
app.integrations["ko-fi"].side_project.function_name({...})
All functions are identical across accounts — only the credentials differ.
Raw agent markdown
# Ko-fi — Lua API Reference
## list_supporters
List all supporters who have donated or subscribed to your Ko-fi page.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `page` | integer | no | Page number for pagination (default: 1) |
| `limit` | integer | no | Number of results per page (default: 25) |
### Examples
```lua
local result = app.integrations["ko-fi"].list_supporters()
for _, supporter in ipairs(result.supporters) do
print(supporter.name .. " — " .. supporter.email)
end
```
#### Paginated results
```lua
local result = app.integrations["ko-fi"].list_supporters({
page = 2,
limit = 10
})
print("Total supporters on page: " .. result.totalCount)
```
---
## get_supporter
Get detailed information about a single Ko-fi supporter.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `email` | string | yes | The email address of the supporter to retrieve |
### Example
```lua
local result = app.integrations["ko-fi"].get_supporter({
email = "fan@example.com"
})
print(result.name)
print(result.total_donated)
print(result.status)
```
---
## list_transactions
List all transactions including donations, subscriptions, and shop orders.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `type` | string | no | Filter by type: `donation`, `subscription`, or `shop_order` |
| `page` | integer | no | Page number for pagination (default: 1) |
| `limit` | integer | no | Number of results per page (default: 25) |
### Examples
#### All recent transactions
```lua
local result = app.integrations["ko-fi"].list_transactions()
for _, tx in ipairs(result.transactions) do
print(tx.type .. " — $" .. tx.amount .. " — " .. tx.supporter_name)
end
```
#### Filter by type
```lua
local result = app.integrations["ko-fi"].list_transactions({
type = "donation"
})
print("Donation count: " .. result.totalCount)
```
---
## list_commissions
List all commission requests on your Ko-fi page.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `status` | string | no | Filter by status: `pending`, `accepted`, `completed`, or `declined` |
| `page` | integer | no | Page number for pagination (default: 1) |
| `limit` | integer | no | Number of results per page (default: 25) |
### Examples
#### All commissions
```lua
local result = app.integrations["ko-fi"].list_commissions()
for _, commission in ipairs(result.commissions) do
print(commission.title .. " — " .. commission.status .. " — $" .. commission.price)
end
```
#### Pending commissions only
```lua
local result = app.integrations["ko-fi"].list_commissions({
status = "pending"
})
```
---
## get_commission
Get details for a single commission.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `commission_id` | string | yes | The ID of the commission to retrieve |
### Example
```lua
local result = app.integrations["ko-fi"].get_commission({
commission_id = "COM123"
})
print(result.title)
print(result.description)
print(result.status)
print(result.requester_name)
```
---
## list_shop_items
List all items in your Ko-fi shop.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `page` | integer | no | Page number for pagination (default: 1) |
| `limit` | integer | no | Number of results per page (default: 25) |
### Examples
```lua
local result = app.integrations["ko-fi"].list_shop_items()
for _, item in ipairs(result.items) do
print(item.name .. " — $" .. item.price)
end
```
---
## get_current_user
Get the profile of the currently authenticated Ko-fi user.
### Parameters
None.
### Example
```lua
local result = app.integrations["ko-fi"].get_current_user()
print("Connected as: " .. result.name)
print("Email: " .. result.email)
```
---
## Multi-Account Usage
If you have multiple Ko-fi accounts configured, use account-specific namespaces:
```lua
-- Default account (always works)
app.integrations["ko-fi"].function_name({...})
-- Explicit default (portable across setups)
app.integrations["ko-fi"].default.function_name({...})
-- Named accounts
app.integrations["ko-fi"].main_page.function_name({...})
app.integrations["ko-fi"].side_project.function_name({...})
```
All functions are identical across accounts — only the credentials differ. local result = app.integrations.ko_fi.list_supporters({page = 1, limit = 1})
print(result) Functions
list_supporters Read
List all supporters who have donated or subscribed to your Ko-fi page. Returns supporter names, emails, and contribution history.
- Lua path
app.integrations.ko_fi.list_supporters- Full name
ko-fi.ko-fi_list_supporters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number for pagination (default: 1). |
limit | integer | no | Number of results per page (default: 25). |
get_supporter Read
Get detailed information about a single Ko-fi supporter by their email address. Returns full supporter profile including contribution history and status.
- Lua path
app.integrations.ko_fi.get_supporter- Full name
ko-fi.ko-fi_get_supporter
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | yes | The email address of the supporter to retrieve. |
list_transactions Read
List all transactions on your Ko-fi page including donations, subscriptions, and shop orders. Returns transaction details with amounts and dates.
- Lua path
app.integrations.ko_fi.list_transactions- Full name
ko-fi.ko-fi_list_transactions
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | no | Filter by transaction type: donation, subscription, or shop_order. |
page | integer | no | Page number for pagination (default: 1). |
limit | integer | no | Number of results per page (default: 25). |
list_commissions Read
List all commission requests on your Ko-fi page. Returns commission details including status, requester info, and pricing.
- Lua path
app.integrations.ko_fi.list_commissions- Full name
ko-fi.ko-fi_list_commissions
| Parameter | Type | Required | Description |
|---|---|---|---|
status | string | no | Filter by commission status: pending, accepted, completed, or declined. |
page | integer | no | Page number for pagination (default: 1). |
limit | integer | no | Number of results per page (default: 25). |
get_commission Read
Get detailed information about a single Ko-fi commission by its ID. Returns full commission data including description, status, and requester details.
- Lua path
app.integrations.ko_fi.get_commission- Full name
ko-fi.ko-fi_get_commission
| Parameter | Type | Required | Description |
|---|---|---|---|
commission_id | string | yes | The ID of the commission to retrieve. |
list_shop_items Read
List all items in your Ko-fi shop. Returns item names, descriptions, prices, and availability.
- Lua path
app.integrations.ko_fi.list_shop_items- Full name
ko-fi.ko-fi_list_shop_items
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number for pagination (default: 1). |
limit | integer | no | Number of results per page (default: 25). |
get_current_user Read
Get the profile of the currently authenticated Ko-fi user. Useful to verify the connection and see account details.
- Lua path
app.integrations.ko_fi.get_current_user- Full name
ko-fi.ko-fi_get_current_user
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||