KosmoKrator

communication

Matrix CLI for Cron Jobs

Use the Matrix CLI for cron jobs with headless JSON commands, schema discovery, credentials, and permission controls.

7 functions 5 read 2 write Bearer token auth

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

Command Shape

# Matrix CLI for Cron Jobs
kosmokrator integrations:configure matrix --set access_token="$MATRIX_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call matrix.matrix_list_rooms '{"limit":1,"from":"example_from"}' --json

Discovery Before Execution

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

kosmo integrations:docs matrix --json
kosmo integrations:docs matrix.matrix_list_rooms --json
kosmo integrations:schema matrix.matrix_list_rooms --json
kosmo integrations:search "Matrix" --json
kosmo integrations:list --json

Useful Matrix CLI Functions

FunctionTypeParametersDescription
matrix.matrix_list_rooms Read limit, from List rooms the authenticated user has joined on Matrix. Returns room IDs, names, and aliases.
matrix.matrix_get_room Read room_id Get details of a specific Matrix room, including name, topic, members, and aliases.
matrix.matrix_create_room Write name, topic, visibility, preset Create a new room on the Matrix homeserver. Returns the newly created room ID.
matrix.matrix_send_message Write room_id, body, msgtype, txn_id Send a text message to a Matrix room. Uses a unique transaction ID to prevent duplicate messages.
matrix.matrix_list_members Read room_id, limit List members of a Matrix room. Returns user IDs, display names, and avatar URLs.
matrix.matrix_get_profile Read user_id Get a Matrix user's profile information, including display name and avatar URL.
matrix.matrix_get_current_user Read none Get the currently authenticated Matrix user's information, including user ID and device ID.

Automation Notes

Related Matrix CLI Pages