KosmoKrator

data

Xata CLI for AI Agents

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

Xata CLI Setup

Xata can be configured headlessly with `kosmokrator integrations:configure xata`.

Install, configure, and verify
# 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 xata --enable --read allow --write ask --json
kosmokrator integrations:doctor xata --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

No credentials are required.

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call xata.xata_list_databases '{}' --json
Provider shortcut
kosmo integrations:xata xata_list_databases '{}' --json

Discovery

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

Discovery commands
kosmo integrations:docs xata --json
kosmo integrations:docs xata.xata_list_databases --json
kosmo integrations:schema xata.xata_list_databases --json
kosmo integrations:search "Xata" --json
kosmo integrations:list --json

Automation Contexts

The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.

CLI Functions

Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.

xata.xata_list_databases

List databases in a Xata workspace.

Read read
Parameters
none
Generic call
kosmo integrations:call xata.xata_list_databases '{}' --json
Shortcut
kosmo integrations:xata xata_list_databases '{}' --json

xata.xata_create_database

Create a Xata database in a workspace.

Write write
Parameters
none
Generic call
kosmo integrations:call xata.xata_create_database '{}' --json
Shortcut
kosmo integrations:xata xata_create_database '{}' --json

xata.xata_list_branches

List branches for a Xata database.

Read read
Parameters
none
Generic call
kosmo integrations:call xata.xata_list_branches '{}' --json
Shortcut
kosmo integrations:xata xata_list_branches '{}' --json

xata.xata_create_branch

Create a branch for a Xata database.

Write write
Parameters
none
Generic call
kosmo integrations:call xata.xata_create_branch '{}' --json
Shortcut
kosmo integrations:xata xata_create_branch '{}' --json

xata.xata_get_schema

Read schema for a database branch.

Read read
Parameters
none
Generic call
kosmo integrations:call xata.xata_get_schema '{}' --json
Shortcut
kosmo integrations:xata xata_get_schema '{}' --json

xata.xata_update_schema

Update schema for a database branch.

Write write
Parameters
none
Generic call
kosmo integrations:call xata.xata_update_schema '{}' --json
Shortcut
kosmo integrations:xata xata_update_schema '{}' --json

xata.xata_query_table

Query records from a table.

Read read
Parameters
none
Generic call
kosmo integrations:call xata.xata_query_table '{}' --json
Shortcut
kosmo integrations:xata xata_query_table '{}' --json

xata.xata_search_branch

Search records across a branch.

Read read
Parameters
none
Generic call
kosmo integrations:call xata.xata_search_branch '{}' --json
Shortcut
kosmo integrations:xata xata_search_branch '{}' --json

xata.xata_get_record

Get one record by table and id.

Read read
Parameters
none
Generic call
kosmo integrations:call xata.xata_get_record '{}' --json
Shortcut
kosmo integrations:xata xata_get_record '{}' --json

xata.xata_insert_record

Insert a record into a table.

Write write
Parameters
none
Generic call
kosmo integrations:call xata.xata_insert_record '{}' --json
Shortcut
kosmo integrations:xata xata_insert_record '{}' --json

xata.xata_update_record

Patch a record by table and id.

Write write
Parameters
none
Generic call
kosmo integrations:call xata.xata_update_record '{}' --json
Shortcut
kosmo integrations:xata xata_update_record '{}' --json

xata.xata_delete_record

Delete a record by table and id.

Write write
Parameters
none
Generic call
kosmo integrations:call xata.xata_delete_record '{}' --json
Shortcut
kosmo integrations:xata xata_delete_record '{}' --json

xata.xata_aggregate_table

Run table aggregation queries.

Read read
Parameters
none
Generic call
kosmo integrations:call xata.xata_aggregate_table '{}' --json
Shortcut
kosmo integrations:xata xata_aggregate_table '{}' --json

xata.xata_vector_search

Run vector similarity search for a table.

Read read
Parameters
none
Generic call
kosmo integrations:call xata.xata_vector_search '{}' --json
Shortcut
kosmo integrations:xata xata_vector_search '{}' --json

xata.xata_transaction

Execute a branch transaction.

Write write
Parameters
none
Generic call
kosmo integrations:call xata.xata_transaction '{}' --json
Shortcut
kosmo integrations:xata xata_transaction '{}' --json

Function Schemas

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

xata.xata_list_databases 0 parameters
Schema command
kosmo integrations:schema xata.xata_list_databases --json
ParameterTypeRequiredDescription
No parameters.
xata.xata_create_database 0 parameters
Schema command
kosmo integrations:schema xata.xata_create_database --json
ParameterTypeRequiredDescription
No parameters.
xata.xata_list_branches 0 parameters
Schema command
kosmo integrations:schema xata.xata_list_branches --json
ParameterTypeRequiredDescription
No parameters.
xata.xata_create_branch 0 parameters
Schema command
kosmo integrations:schema xata.xata_create_branch --json
ParameterTypeRequiredDescription
No parameters.
xata.xata_get_schema 0 parameters
Schema command
kosmo integrations:schema xata.xata_get_schema --json
ParameterTypeRequiredDescription
No parameters.
xata.xata_update_schema 0 parameters
Schema command
kosmo integrations:schema xata.xata_update_schema --json
ParameterTypeRequiredDescription
No parameters.
xata.xata_query_table 0 parameters
Schema command
kosmo integrations:schema xata.xata_query_table --json
ParameterTypeRequiredDescription
No parameters.
xata.xata_search_branch 0 parameters
Schema command
kosmo integrations:schema xata.xata_search_branch --json
ParameterTypeRequiredDescription
No parameters.
xata.xata_get_record 0 parameters
Schema command
kosmo integrations:schema xata.xata_get_record --json
ParameterTypeRequiredDescription
No parameters.
xata.xata_insert_record 0 parameters
Schema command
kosmo integrations:schema xata.xata_insert_record --json
ParameterTypeRequiredDescription
No parameters.
xata.xata_update_record 0 parameters
Schema command
kosmo integrations:schema xata.xata_update_record --json
ParameterTypeRequiredDescription
No parameters.
xata.xata_delete_record 0 parameters
Schema command
kosmo integrations:schema xata.xata_delete_record --json
ParameterTypeRequiredDescription
No parameters.
xata.xata_aggregate_table 0 parameters
Schema command
kosmo integrations:schema xata.xata_aggregate_table --json
ParameterTypeRequiredDescription
No parameters.
xata.xata_transaction 0 parameters
Schema command
kosmo integrations:schema xata.xata_transaction --json
ParameterTypeRequiredDescription
No parameters.

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.