other
Strapi CLI for Cron Jobs
Use the Strapi CLI for cron jobs with headless JSON commands, schema discovery, credentials, and permission controls.
7 functions 4 read 3 write API token auth
Strapi CLI for Cron Jobs
Schedule repeatable integration workflows from cron while keeping credentials in KosmoKrator config.
Use the headless CLI from cron when an operation should run without an interactive agent session. The Strapi CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Strapi CLI for Cron Jobs
kosmokrator integrations:configure strapi --set api_token="$STRAPI_API_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call strapi.strapi_list_entries '{"content_type":"example_content_type","page":1,"page_size":1,"sort":"example_sort","populate":"example_populate"}' --json Discovery Before Execution
Agents and scripts can inspect Strapi docs and schemas before choosing a function.
kosmo integrations:docs strapi --json
kosmo integrations:docs strapi.strapi_list_entries --json
kosmo integrations:schema strapi.strapi_list_entries --json
kosmo integrations:search "Strapi" --json
kosmo integrations:list --json Useful Strapi CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
strapi.strapi_list_entries | Read | content_type, page, page_size, sort, populate | List entries for a content type in Strapi. Supports pagination, sorting, and field population (relations, media, components). |
strapi.strapi_get_entry | Read | content_type, id, populate | Get a single entry from Strapi by content type and ID. Supports population of relations and media. |
strapi.strapi_create_entry | Write | content_type, data | Create a new entry in Strapi for a given content type. The data is automatically wrapped in the required "data" envelope. |
strapi.strapi_update_entry | Write | content_type, id, data | Update an existing entry in Strapi by content type and ID. The data is automatically wrapped in the required "data" envelope. |
strapi.strapi_delete_entry | Write | content_type, id | Delete an entry from Strapi by content type and ID. This action is permanent. |
strapi.strapi_list_content_types | Read | none | List all content types defined in the Strapi Content-Type Builder. Returns API IDs, display names, and schema information. |
strapi.strapi_get_current_user | Read | none | Get the currently authenticated Strapi user. Useful for verifying the API token and checking permissions. |
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.