KosmoKrator

productivity

Bubble CLI for AI Agents

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

Bubble CLI Setup

Bubble can be configured headlessly with `kosmokrator integrations:configure bubble`.

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 bubble --set api_key="$BUBBLE_API_KEY" --set hostname="$BUBBLE_HOSTNAME" --enable --read allow --write ask --json
kosmokrator integrations:doctor bubble --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.

KeyEnv varTypeRequiredLabel
api_key BUBBLE_API_KEY Secret secret yes API Key
hostname BUBBLE_HOSTNAME URL url yes App URL
api_path BUBBLE_API_PATH Text string no API Path

Command Patterns

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

Generic CLI call
kosmo integrations:call bubble.bubble_get_swagger '{}' --json
Provider shortcut
kosmo integrations:bubble bubble_get_swagger '{}' --json

Discovery

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

Discovery commands
kosmo integrations:docs bubble --json
kosmo integrations:docs bubble.bubble_get_swagger --json
kosmo integrations:schema bubble.bubble_get_swagger --json
kosmo integrations:search "Bubble" --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.

bubble.bubble_get_swagger

Get the Bubble app Swagger specification for enabled Data API and Workflow API endpoints.

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

bubble.bubble_list_records

List records from a Bubble data type. Supports filtering with constraints, pagination with limit and cursor. Returns matching records and a remaining count for further pagination.

Read read
Parameters
type, constraints, limit, cursor, sort_field, descending
Generic call
kosmo integrations:call bubble.bubble_list_records '{"type":"example_type","constraints":"example_constraints","limit":1,"cursor":1,"sort_field":"example_sort_field","descending":true}' --json
Shortcut
kosmo integrations:bubble bubble_list_records '{"type":"example_type","constraints":"example_constraints","limit":1,"cursor":1,"sort_field":"example_sort_field","descending":true}' --json

bubble.bubble_get_record

Get a single record from Bubble by its data type and unique ID. Returns all fields of the record.

Read read
Parameters
type, id
Generic call
kosmo integrations:call bubble.bubble_get_record '{"type":"example_type","id":"example_id"}' --json
Shortcut
kosmo integrations:bubble bubble_get_record '{"type":"example_type","id":"example_id"}' --json

bubble.bubble_create_record

Create a new record in a Bubble data type. Provide field names and values as a JSON object. Returns the created record including its generated ID.

Write write
Parameters
type, fields
Generic call
kosmo integrations:call bubble.bubble_create_record '{"type":"example_type","fields":"example_fields"}' --json
Shortcut
kosmo integrations:bubble bubble_create_record '{"type":"example_type","fields":"example_fields"}' --json

bubble.bubble_update_record

Update an existing record in Bubble by its data type and unique ID. Only the fields provided will be changed; other fields remain unchanged. Returns the updated record.

Write write
Parameters
type, id, fields
Generic call
kosmo integrations:call bubble.bubble_update_record '{"type":"example_type","id":"example_id","fields":"example_fields"}' --json
Shortcut
kosmo integrations:bubble bubble_update_record '{"type":"example_type","id":"example_id","fields":"example_fields"}' --json

bubble.bubble_replace_record

Replace a Bubble record by data type and ID using the Data API PUT endpoint.

Write write
Parameters
type, id, fields
Generic call
kosmo integrations:call bubble.bubble_replace_record '{"type":"example_type","id":"example_id","fields":"example_fields"}' --json
Shortcut
kosmo integrations:bubble bubble_replace_record '{"type":"example_type","id":"example_id","fields":"example_fields"}' --json

bubble.bubble_delete_record

Delete a record from Bubble by its data type and unique ID. This action is permanent and cannot be undone.

Write write
Parameters
type, id
Generic call
kosmo integrations:call bubble.bubble_delete_record '{"type":"example_type","id":"example_id"}' --json
Shortcut
kosmo integrations:bubble bubble_delete_record '{"type":"example_type","id":"example_id"}' --json

bubble.bubble_trigger_workflow

Trigger an exposed Bubble API workflow using POST.

Write write
Parameters
workflow, payload, initialize
Generic call
kosmo integrations:call bubble.bubble_trigger_workflow '{"workflow":"example_workflow","payload":"example_payload","initialize":true}' --json
Shortcut
kosmo integrations:bubble bubble_trigger_workflow '{"workflow":"example_workflow","payload":"example_payload","initialize":true}' --json

bubble.bubble_trigger_workflow_get

Trigger an exposed Bubble API workflow using GET query parameters.

Write write
Parameters
workflow, params
Generic call
kosmo integrations:call bubble.bubble_trigger_workflow_get '{"workflow":"example_workflow","params":"example_params"}' --json
Shortcut
kosmo integrations:bubble bubble_trigger_workflow_get '{"workflow":"example_workflow","params":"example_params"}' --json

Function Schemas

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

bubble.bubble_get_swagger 0 parameters
Schema command
kosmo integrations:schema bubble.bubble_get_swagger --json
ParameterTypeRequiredDescription
No parameters.
bubble.bubble_list_records 6 parameters
Schema command
kosmo integrations:schema bubble.bubble_list_records --json
ParameterTypeRequiredDescription
type string yes The Bubble data type name (case-sensitive, e.g. "User", "Product", "Order").
constraints string no JSON-encoded array of Bubble constraint objects for filtering. Each constraint is {"key": "field_name", "constraint_type": "equals", "value": "some_value"}. Pass as a JSON string.
limit integer no Maximum number of records to return (1–100, default: 100).
cursor integer no Offset for pagination (0-based). Use the "remaining" count from the previous response to determine if more pages exist.
sort_field string no Optional field to sort the list on.
descending boolean no Sort descending when true.
bubble.bubble_get_record 2 parameters
Schema command
kosmo integrations:schema bubble.bubble_get_record --json
ParameterTypeRequiredDescription
type string yes The Bubble data type name (case-sensitive, e.g. "User", "Product", "Order").
id string yes The unique identifier of the record (Bubble-generated UUID).
bubble.bubble_create_record 2 parameters
Schema command
kosmo integrations:schema bubble.bubble_create_record --json
ParameterTypeRequiredDescription
type string yes The Bubble data type name (case-sensitive, e.g. "User", "Product", "Order").
fields string yes JSON object of field names and values for the new record. Example: {"name": "John", "email": "john@example.com", "age": 30}. Pass as a JSON string.
bubble.bubble_update_record 3 parameters
Schema command
kosmo integrations:schema bubble.bubble_update_record --json
ParameterTypeRequiredDescription
type string yes The Bubble data type name (case-sensitive, e.g. "User", "Product", "Order").
id string yes The unique identifier of the record to update (Bubble-generated UUID).
fields string yes JSON object of field names and values to update. Only the provided fields will be changed. Example: {"name": "Jane", "status": "active"}. Pass as a JSON string.
bubble.bubble_replace_record 3 parameters
Schema command
kosmo integrations:schema bubble.bubble_replace_record --json
ParameterTypeRequiredDescription
type string yes Bubble data type name.
id string yes Bubble unique ID.
fields object yes Full field payload for the record.
bubble.bubble_delete_record 2 parameters
Schema command
kosmo integrations:schema bubble.bubble_delete_record --json
ParameterTypeRequiredDescription
type string yes The Bubble data type name (case-sensitive, e.g. "User", "Product", "Order").
id string yes The unique identifier of the record to delete (Bubble-generated UUID).
bubble.bubble_trigger_workflow 3 parameters
Schema command
kosmo integrations:schema bubble.bubble_trigger_workflow --json
ParameterTypeRequiredDescription
workflow string yes API workflow name.
payload object no JSON body sent to the workflow.
initialize boolean no Append /initialize for Bubble Detect data mode.
bubble.bubble_trigger_workflow_get 2 parameters
Schema command
kosmo integrations:schema bubble.bubble_trigger_workflow_get --json
ParameterTypeRequiredDescription
workflow string yes API workflow name.
params object no Query parameters sent to the workflow.

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.