KosmoKrator

other

Strapi CLI for Coding Agents

Use the Strapi CLI for coding agents with headless JSON commands, schema discovery, credentials, and permission controls.

7 functions 4 read 3 write API token auth

Strapi CLI for Coding Agents

Let coding agents discover schemas and execute integration functions through CLI commands or MCP.

Use this pattern when another coding agent needs exact commands and schema discovery. 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 Coding Agents
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

FunctionTypeParametersDescription
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

Related Strapi CLI Pages