data
Convex CLI for Headless Automation
Use the Convex CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.
7 functions 4 read 3 write Bearer token auth
Convex CLI for Headless Automation
Use KosmoKrator as a non-interactive integration runtime for local automations and wrappers.
Use headless automation when another tool needs a stable local command surface. The Convex CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Convex CLI for Headless Automation
kosmokrator integrations:configure convex --set access_token="$CONVEX_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call convex.convex_list_tables '{}' --json Discovery Before Execution
Agents and scripts can inspect Convex docs and schemas before choosing a function.
kosmo integrations:docs convex --json
kosmo integrations:docs convex.convex_list_tables --json
kosmo integrations:schema convex.convex_list_tables --json
kosmo integrations:search "Convex" --json
kosmo integrations:list --json Useful Convex CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
convex.convex_list_tables | Read | none | List all tables in the Convex deployment. |
convex.convex_get_table | Read | table | Get metadata and schema for a specific Convex table. |
convex.convex_query_documents | Read | table, filter, order, limit, cursor | Query documents from a Convex table with optional filtering and pagination. |
convex.convex_create_document | Write | table, fields | Create a new document in a Convex table. |
convex.convex_update_document | Write | table, document_id, fields | Update an existing document in a Convex table. |
convex.convex_delete_document | Write | table, document_id | Delete a document from a Convex table. |
convex.convex_get_current_user | Read | none | Get the authenticated Convex user's profile information. Returns account details like name and email. Use this to verify API connectivity. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.