KosmoKrator

communication

Discourse CLI for Cron Jobs

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

8 functions 5 read 3 write API key auth

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

Command Shape

# Discourse CLI for Cron Jobs
kosmokrator integrations:configure discourse --set api_key="$DISCOURSE_API_KEY" --set api_username="$DISCOURSE_API_USERNAME" --set hostname="$DISCOURSE_HOSTNAME" --enable --read allow --write ask --json
kosmo integrations:call discourse.discourse_list_topics '{"page":1}' --json

Discovery Before Execution

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

kosmo integrations:docs discourse --json
kosmo integrations:docs discourse.discourse_list_topics --json
kosmo integrations:schema discourse.discourse_list_topics --json
kosmo integrations:search "Discourse" --json
kosmo integrations:list --json

Useful Discourse CLI Functions

FunctionTypeParametersDescription
discourse.discourse_list_topics Read page List the latest topics from the Discourse forum. Returns topic titles, categories, and activity metadata.
discourse.discourse_get_topic Read topic_id Get a single Discourse topic by ID, including its posts, author, and metadata.
discourse.discourse_create_topic Write title, raw, category, tags Create a new topic in a Discourse category. Requires a title, body content (Markdown), and category ID.
discourse.discourse_update_topic Write topic_id, title, category Update an existing Discourse topic's title or move it to a different category.
discourse.discourse_list_categories Read none List all categories on the Discourse forum. Returns category names, IDs, descriptions, and parent relationships.
discourse.discourse_get_category Read category_id Get a single Discourse category by ID, including its recent topics and metadata.
discourse.discourse_create_post Write topic_id, raw Reply to an existing Discourse topic with a new post. Provide the topic ID and body content in Markdown.
discourse.discourse_get_current_user Read none Get the currently authenticated Discourse user profile. Useful for verifying API credentials and identifying the user context.

Automation Notes

Related Discourse CLI Pages