productivity
Grist CLI for Headless Automation
Use the Grist CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.
13 functions 9 read 4 write API key auth
Grist 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 Grist CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Grist CLI for Headless Automation
kosmokrator integrations:configure grist --set api_key="$GRIST_API_KEY" --set base_url="$GRIST_BASE_URL" --enable --read allow --write ask --json
kosmo integrations:call grist.grist_list_workspaces '{"org_id":1}' --json Discovery Before Execution
Agents and scripts can inspect Grist docs and schemas before choosing a function.
kosmo integrations:docs grist --json
kosmo integrations:docs grist.grist_list_workspaces --json
kosmo integrations:schema grist.grist_list_workspaces --json
kosmo integrations:search "Grist" --json
kosmo integrations:list --json Useful Grist CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
grist.grist_list_workspaces | Read | org_id | List all workspaces in a Grist organization. |
grist.grist_get_workspace | Read | workspace_id | Get details for a single Grist workspace, including its documents. |
grist.grist_list_docs | Read | org_id | List all documents in a Grist organization. |
grist.grist_get_doc | Read | doc_id | Get details for a single Grist document by ID. |
grist.grist_list_tables | Read | doc_id | List all tables in a Grist document. |
grist.grist_get_table | Read | doc_id, table_id | Get a single table from a Grist document. |
grist.grist_list_records | Read | doc_id, table_id, limit, sort, filter | List records from a Grist table with optional filtering, sorting, and limiting. |
grist.grist_get_record | Read | doc_id, table_id | Get full column data for a Grist table (raw cell values per column). |
grist.grist_create_records | Write | doc_id, table_id, records | Create one or more records in a Grist table. |
grist.grist_update_records | Write | doc_id, table_id, records | Update one or more existing records in a Grist table. |
grist.grist_delete_records | Write | doc_id, table_id, record_ids | Delete records from a Grist table by row IDs. |
grist.grist_create_column | Write | doc_id, table_id, col_id, label, type, formula | Create a new column in a Grist table. |
grist.grist_list_columns | Read | doc_id, table_id | List all columns in a Grist table. |
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.