communication
Knock CLI for CI
Use the Knock CLI for CI with headless JSON commands, schema discovery, credentials, and permission controls.
7 functions 6 read 1 write API key auth
Knock CLI for CI
Run integration calls from CI jobs with JSON output, explicit credentials, and predictable exit status.
Use this shape when a pipeline needs to read or update an external service. The Knock CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Knock CLI for CI
kosmokrator integrations:configure knock --set api_key="$KNOCK_API_KEY" --enable --read allow --write ask --json
kosmo integrations:call knock.knock_list_workflows '{"limit":1,"page":1}' --json Discovery Before Execution
Agents and scripts can inspect Knock docs and schemas before choosing a function.
kosmo integrations:docs knock --json
kosmo integrations:docs knock.knock_list_workflows --json
kosmo integrations:schema knock.knock_list_workflows --json
kosmo integrations:search "Knock" --json
kosmo integrations:list --json Useful Knock CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
knock.knock_list_workflows | Read | limit, page | List notification workflows from Knock. Returns workflow IDs and details you can use to trigger or inspect workflows. |
knock.knock_get_workflow | Read | id | Get details of a specific notification workflow in Knock, including its steps and configuration. |
knock.knock_trigger_workflow | Write | id, recipients, data, cancellation_criteria | Trigger a notification workflow in Knock for one or more recipients. The workflow will execute its configured steps (email, Slack, in-app, etc.) for each recipient. |
knock.knock_list_messages | Read | limit, page, status | List notification messages from Knock. Optionally filter by delivery status (e.g., sent, delivered, undelivered). |
knock.knock_get_message | Read | id | Get details of a specific notification message in Knock, including its content, delivery status, and channel. |
knock.knock_list_recipients | Read | limit, page | List notification recipients from Knock. Returns recipient identifiers and their preferences. |
knock.knock_get_current_user | Read | none | Get the currently authenticated Knock user. Useful for verifying API credentials and inspecting account details. |
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.