KosmoKrator

productivity

Knock CLI for AI Agents

Use the Knock CLI from KosmoKrator to call Knock tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

Knock CLI Setup

Knock can be configured headlessly with `kosmokrator integrations:configure knock`.

Install, configure, and verify
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure knock --set api_key="$KNOCK_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor knock --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

KeyEnv varTypeRequiredLabel
api_key KNOCK_API_KEY Secret secret yes API Key
url KNOCK_URL URL url no Knock URL

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call knock.knock_list_workflows '{"limit":1,"page":1}' --json
Provider shortcut
kosmo integrations:knock knock_list_workflows '{"limit":1,"page":1}' --json

Discovery

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

Discovery commands
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

Automation Contexts

The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.

CLI Functions

Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.

knock.knock_list_workflows

List notification workflows from Knock. Returns workflow IDs and details you can use to trigger or inspect workflows.

Read read
Parameters
limit, page
Generic call
kosmo integrations:call knock.knock_list_workflows '{"limit":1,"page":1}' --json
Shortcut
kosmo integrations:knock knock_list_workflows '{"limit":1,"page":1}' --json

knock.knock_get_workflow

Get details of a specific notification workflow in Knock, including its steps and configuration.

Read read
Parameters
id
Generic call
kosmo integrations:call knock.knock_get_workflow '{"id":"example_id"}' --json
Shortcut
kosmo integrations:knock knock_get_workflow '{"id":"example_id"}' --json

knock.knock_trigger_workflow

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.

Write write
Parameters
id, recipients, data, cancellation_criteria
Generic call
kosmo integrations:call knock.knock_trigger_workflow '{"id":"example_id","recipients":"example_recipients","data":"example_data","cancellation_criteria":"example_cancellation_criteria"}' --json
Shortcut
kosmo integrations:knock knock_trigger_workflow '{"id":"example_id","recipients":"example_recipients","data":"example_data","cancellation_criteria":"example_cancellation_criteria"}' --json

knock.knock_list_messages

List notification messages from Knock. Optionally filter by delivery status (e.g., sent, delivered, undelivered).

Read read
Parameters
limit, page, status
Generic call
kosmo integrations:call knock.knock_list_messages '{"limit":1,"page":1,"status":"example_status"}' --json
Shortcut
kosmo integrations:knock knock_list_messages '{"limit":1,"page":1,"status":"example_status"}' --json

knock.knock_get_message

Get details of a specific notification message in Knock, including its content, delivery status, and channel.

Read read
Parameters
id
Generic call
kosmo integrations:call knock.knock_get_message '{"id":"example_id"}' --json
Shortcut
kosmo integrations:knock knock_get_message '{"id":"example_id"}' --json

knock.knock_list_recipients

List notification recipients from Knock. Returns recipient identifiers and their preferences.

Read read
Parameters
limit, page
Generic call
kosmo integrations:call knock.knock_list_recipients '{"limit":1,"page":1}' --json
Shortcut
kosmo integrations:knock knock_list_recipients '{"limit":1,"page":1}' --json

knock.knock_get_current_user

Get the currently authenticated Knock user. Useful for verifying API credentials and inspecting account details.

Read read
Parameters
none
Generic call
kosmo integrations:call knock.knock_get_current_user '{}' --json
Shortcut
kosmo integrations:knock knock_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

knock.knock_list_workflows 2 parameters
Schema command
kosmo integrations:schema knock.knock_list_workflows --json
ParameterTypeRequiredDescription
limit integer no Maximum number of workflows to return (default: 25).
page integer no Page number for pagination.
knock.knock_get_workflow 1 parameters
Schema command
kosmo integrations:schema knock.knock_get_workflow --json
ParameterTypeRequiredDescription
id string yes The workflow ID.
knock.knock_trigger_workflow 4 parameters
Schema command
kosmo integrations:schema knock.knock_trigger_workflow --json
ParameterTypeRequiredDescription
id string yes The workflow ID to trigger.
recipients array yes Array of recipient identifiers (user IDs or emails) to receive the notification.
data array no Payload data to pass to the workflow. Used in notification templates as merge variables.
cancellation_criteria array no Cancellation criteria for the workflow run. Allows automatic cancellation based on conditions.
knock.knock_list_messages 3 parameters
Schema command
kosmo integrations:schema knock.knock_list_messages --json
ParameterTypeRequiredDescription
limit integer no Maximum number of messages to return (default: 25).
page integer no Page number for pagination.
status string no Filter by message status: sent, delivered, undelivered, or opened.
knock.knock_get_message 1 parameters
Schema command
kosmo integrations:schema knock.knock_get_message --json
ParameterTypeRequiredDescription
id string yes The message ID.
knock.knock_list_recipients 2 parameters
Schema command
kosmo integrations:schema knock.knock_list_recipients --json
ParameterTypeRequiredDescription
limit integer no Maximum number of recipients to return (default: 25).
page integer no Page number for pagination.
knock.knock_get_current_user 0 parameters
Schema command
kosmo integrations:schema knock.knock_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.