KosmoKrator

other

Clerk CLI for Headless Automation

Use the Clerk CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.

7 functions 4 read 3 write API key auth

Clerk 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 Clerk CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.

Command Shape

# Clerk CLI for Headless Automation
kosmokrator integrations:configure clerk --set secret_key="$CLERK_SECRET_KEY" --enable --read allow --write ask --json
kosmo integrations:call clerk.clerk_list_users '{"limit":1,"offset":1,"email_address":"example_email_address","phone_number":"example_phone_number","query":"example_query","order_by":"example_order_by"}' --json

Discovery Before Execution

Agents and scripts can inspect Clerk docs and schemas before choosing a function.

kosmo integrations:docs clerk --json
kosmo integrations:docs clerk.clerk_list_users --json
kosmo integrations:schema clerk.clerk_list_users --json
kosmo integrations:search "Clerk" --json
kosmo integrations:list --json

Useful Clerk CLI Functions

FunctionTypeParametersDescription
clerk.clerk_list_users Read limit, offset, email_address, phone_number, query, order_by List users from Clerk with optional filtering and pagination. Returns user IDs, emails, names, and profile details.
clerk.clerk_get_user Read id Retrieve a single Clerk user by their user ID. Returns full profile details including email, name, and metadata.
clerk.clerk_create_user Write email_address, first_name, last_name, password, username Create a new user in Clerk. Requires at least one email address. Optionally set name, password, and username.
clerk.clerk_update_user Write id, first_name, last_name, username Update an existing Clerk user's profile. Provide the user ID and fields to update.
clerk.clerk_delete_user Write id Delete a user from Clerk. This action is irreversible and will remove all associated data.
clerk.clerk_list_organizations Read limit, offset, query List organizations from Clerk with optional filtering and pagination. Returns organization IDs, names, and metadata.
clerk.clerk_get_current_user Read none Health check — verify Clerk API connectivity by fetching the first user. Returns a single user or empty result to confirm the API is reachable.

Automation Notes

Related Clerk CLI Pages