productivity
Hostinger Lua API for KosmoKrator Agents
Agent-facing Lua documentation and function reference for the Hostinger KosmoKrator integration.Lua Namespace
Agents call this integration through app.integrations.hostinger.*.
Use lua_read_doc("integrations.hostinger") 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
Hostinger workflow without starting an interactive agent session.
kosmo integrations:lua --eval 'dump(app.integrations.hostinger.list_servers({}))' --json kosmo integrations:lua --eval 'print(docs.read("hostinger"))' --json
kosmo integrations:lua --eval 'print(docs.read("hostinger.list_servers"))' --json Workflow file
Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.
local hostinger = app.integrations.hostinger
local result = hostinger.list_servers({})
dump(result) kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json integrations:lua exposes app.integrations.hostinger, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.hostinger.default.* or app.integrations.hostinger.work.* when you configured named credential accounts.
MCP-only Lua
If the script only needs configured MCP servers and does not need Hostinger, 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.
Hostinger — Lua API Reference
list_servers
List all VPS servers in the Hostinger account.
Parameters
None.
Example
local result = app.integrations.hostinger.list_servers({})
for _, server in ipairs(result.servers) do
print(server.name .. " (" .. server.status .. ") - " .. server.plan)
end
get_server
Get details for a specific VPS server.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
server_id | integer | yes | The VPS server ID |
Example
local result = app.integrations.hostinger.get_server({ server_id = 12345678 })
local s = result.server
print(s.name .. " - " .. s.ip_address .. " - " .. s.status)
list_domains
List all domains in the Hostinger account.
Parameters
None.
Example
local result = app.integrations.hostinger.list_domains({})
for _, domain in ipairs(result.domains) do
print(domain.name .. " (" .. domain.status .. ")")
end
get_domain
Get details for a specific domain.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
domain_id | integer | yes | The domain ID |
Example
local result = app.integrations.hostinger.get_domain({ domain_id = 12345 })
print(result.domain.name .. " - " .. result.domain.status)
list_dns_records
List DNS records for a specific domain.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
domain_id | integer | yes | The domain ID to list DNS records for |
Example
local result = app.integrations.hostinger.list_dns_records({ domain_id = 12345 })
for _, record in ipairs(result.records) do
print(record.type .. " " .. record.name .. " -> " .. record.content .. " (TTL: " .. record.ttl .. ")")
end
list_ssl
List all SSL certificates in the Hostinger account.
Parameters
None.
Example
local result = app.integrations.hostinger.list_ssl({})
for _, cert in ipairs(result.ssl) do
print(cert.domain .. " - " .. cert.status .. " - expires: " .. cert.expires_at)
end
get_current_user
Get the current authenticated account information.
Parameters
None.
Example
local result = app.integrations.hostinger.get_current_user({})
print("Account: " .. result.email)
Multi-Account Usage
If you have multiple Hostinger accounts configured, use account-specific namespaces:
-- Default account (always works)
app.integrations.hostinger.list_servers({})
-- Explicit default (portable across setups)
app.integrations.hostinger.default.list_servers({})
-- Named accounts
app.integrations.hostinger.production.list_servers({})
app.integrations.hostinger.staging.list_servers({})
All functions are identical across accounts — only the credentials differ.
Raw agent markdown
# Hostinger — Lua API Reference
## list_servers
List all VPS servers in the Hostinger account.
### Parameters
None.
### Example
```lua
local result = app.integrations.hostinger.list_servers({})
for _, server in ipairs(result.servers) do
print(server.name .. " (" .. server.status .. ") - " .. server.plan)
end
```
---
## get_server
Get details for a specific VPS server.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `server_id` | integer | yes | The VPS server ID |
### Example
```lua
local result = app.integrations.hostinger.get_server({ server_id = 12345678 })
local s = result.server
print(s.name .. " - " .. s.ip_address .. " - " .. s.status)
```
---
## list_domains
List all domains in the Hostinger account.
### Parameters
None.
### Example
```lua
local result = app.integrations.hostinger.list_domains({})
for _, domain in ipairs(result.domains) do
print(domain.name .. " (" .. domain.status .. ")")
end
```
---
## get_domain
Get details for a specific domain.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `domain_id` | integer | yes | The domain ID |
### Example
```lua
local result = app.integrations.hostinger.get_domain({ domain_id = 12345 })
print(result.domain.name .. " - " .. result.domain.status)
```
---
## list_dns_records
List DNS records for a specific domain.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `domain_id` | integer | yes | The domain ID to list DNS records for |
### Example
```lua
local result = app.integrations.hostinger.list_dns_records({ domain_id = 12345 })
for _, record in ipairs(result.records) do
print(record.type .. " " .. record.name .. " -> " .. record.content .. " (TTL: " .. record.ttl .. ")")
end
```
---
## list_ssl
List all SSL certificates in the Hostinger account.
### Parameters
None.
### Example
```lua
local result = app.integrations.hostinger.list_ssl({})
for _, cert in ipairs(result.ssl) do
print(cert.domain .. " - " .. cert.status .. " - expires: " .. cert.expires_at)
end
```
---
## get_current_user
Get the current authenticated account information.
### Parameters
None.
### Example
```lua
local result = app.integrations.hostinger.get_current_user({})
print("Account: " .. result.email)
```
---
## Multi-Account Usage
If you have multiple Hostinger accounts configured, use account-specific namespaces:
```lua
-- Default account (always works)
app.integrations.hostinger.list_servers({})
-- Explicit default (portable across setups)
app.integrations.hostinger.default.list_servers({})
-- Named accounts
app.integrations.hostinger.production.list_servers({})
app.integrations.hostinger.staging.list_servers({})
```
All functions are identical across accounts — only the credentials differ. local result = app.integrations.hostinger.list_servers({})
print(result) Functions
list_servers Read
List all VPS servers in the Hostinger account. Returns server IDs, names, status, plan, and IP addresses.
- Lua path
app.integrations.hostinger.list_servers- Full name
hostinger.hostinger_list_servers
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_server Read
Get details for a specific Hostinger VPS server by ID. Returns full server information including IP addresses, plan, and status.
- Lua path
app.integrations.hostinger.get_server- Full name
hostinger.hostinger_get_server
| Parameter | Type | Required | Description |
|---|---|---|---|
server_id | integer | yes | The VPS server ID. |
list_domains Read
List all domains in the Hostinger account. Returns domain IDs, names, and status.
- Lua path
app.integrations.hostinger.list_domains- Full name
hostinger.hostinger_list_domains
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_domain Read
Get details for a specific domain in Hostinger by domain ID. Returns full domain information.
- Lua path
app.integrations.hostinger.get_domain- Full name
hostinger.hostinger_get_domain
| Parameter | Type | Required | Description |
|---|---|---|---|
domain_id | integer | yes | The domain ID. |
list_dns_records Read
List DNS records for a specific domain in Hostinger. Returns all record types (A, AAAA, CNAME, MX, TXT, etc.).
- Lua path
app.integrations.hostinger.list_dns_records- Full name
hostinger.hostinger_list_dns_records
| Parameter | Type | Required | Description |
|---|---|---|---|
domain_id | integer | yes | The domain ID to list DNS records for. |
list_ssl_certificates Read
List all SSL certificates in the Hostinger account. Returns certificate details including domain, status, and expiry.
- Lua path
app.integrations.hostinger.list_ssl_certificates- Full name
hostinger.hostinger_list_ssl
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_current_user Read
Get information about the current authenticated Hostinger account, including email and user details.
- Lua path
app.integrations.hostinger.get_current_user- Full name
hostinger.hostinger_get_current_user
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||