Slack CLI Setup Slack can be configured headlessly with `kosmokrator integrations:configure slack`.
# 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 slack --set bot_token=" $SLACK_BOT_TOKEN " --enable --read allow --write ask --json
kosmokrator integrations:doctor slack --json
kosmokrator integrations:status --json Credentials
Authentication type: API token api_token. Configure credentials once, then use the same stored profile from
scripts, coding CLIs, Lua code mode, and the MCP gateway.
Call Slack Headlessly Use the generic call form when another coding CLI or script needs a stable universal interface.
kosmo integrations:call slack.slack_send_message '{
"channel": "example_channel",
"text": "example_text",
"blocks": "example_blocks",
"thread_ts": "example_thread_ts",
"reply_broadcast": true,
"unfurl_links": true,
"markdown": true
}' --json Use the provider shortcut form for shorter human-facing commands.
kosmo integrations:slack slack_send_message '{
"channel": "example_channel",
"text": "example_text",
"blocks": "example_blocks",
"thread_ts": "example_thread_ts",
"reply_broadcast": true,
"unfurl_links": true,
"markdown": true
}' --json Agent Discovery Commands
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs slack --json
kosmo integrations:docs slack.slack_send_message --json
kosmo integrations:schema slack.slack_send_message --json
kosmo integrations:search "Slack" --json
kosmo integrations:list --json All CLI Functions
Every function below can be called headlessly. The generic form is stable across all integrations;
the provider shortcut is shorter but specific to Slack.
slack.slack_send_message Write write Send a message to a Slack channel or DM. Supports text, blocks, and thread replies.
channel, text, blocks, thread_ts, reply_broadcast, unfurl_links, markdown kosmo integrations:call slack.slack_send_message '{"channel":"example_channel","text":"example_text","blocks":"example_blocks","thread_ts":"example_thread_ts","reply_broadcast":true,"unfurl_links":true,"markdown":true}' --json copy kosmo integrations:slack slack_send_message '{"channel":"example_channel","text":"example_text","blocks":"example_blocks","thread_ts":"example_thread_ts","reply_broadcast":true,"unfurl_links":true,"markdown":true}' --json copy
slack.slack_update_message Write write Update an existing Slack message.
channel, ts, text, blocks kosmo integrations:call slack.slack_update_message '{"channel":"example_channel","ts":"example_ts","text":"example_text","blocks":"example_blocks"}' --json copy kosmo integrations:slack slack_update_message '{"channel":"example_channel","ts":"example_ts","text":"example_text","blocks":"example_blocks"}' --json copy
slack.slack_delete_message Write write Delete a message from a Slack channel.
channel, ts kosmo integrations:call slack.slack_delete_message '{"channel":"example_channel","ts":"example_ts"}' --json copy kosmo integrations:slack slack_delete_message '{"channel":"example_channel","ts":"example_ts"}' --json copy
slack.slack_get_message Read read Get a specific message by its timestamp. Optionally fetch a message within a thread.
channel, ts, thread_ts kosmo integrations:call slack.slack_get_message '{"channel":"example_channel","ts":"example_ts","thread_ts":"example_thread_ts"}' --json copy kosmo integrations:slack slack_get_message '{"channel":"example_channel","ts":"example_ts","thread_ts":"example_thread_ts"}' --json copy
slack.slack_search_messages Read read Search for messages across all Slack channels and DMs.
query, count, page, sort, sort_dir kosmo integrations:call slack.slack_search_messages '{"query":"example_query","count":1,"page":1,"sort":"example_sort","sort_dir":"example_sort_dir"}' --json copy kosmo integrations:slack slack_search_messages '{"query":"example_query","count":1,"page":1,"sort":"example_sort","sort_dir":"example_sort_dir"}' --json copy
slack.slack_get_permalink Read read Get a permalink URL for a specific Slack message.
channel, message_ts kosmo integrations:call slack.slack_get_permalink '{"channel":"example_channel","message_ts":"example_message_ts"}' --json copy kosmo integrations:slack slack_get_permalink '{"channel":"example_channel","message_ts":"example_message_ts"}' --json copy
slack.slack_get_channel_history Read read Get message history for a Slack channel. Supports pagination with cursors.
channel, limit, oldest, latest, cursor kosmo integrations:call slack.slack_get_channel_history '{"channel":"example_channel","limit":1,"oldest":"example_oldest","latest":"example_latest","cursor":"example_cursor"}' --json copy kosmo integrations:slack slack_get_channel_history '{"channel":"example_channel","limit":1,"oldest":"example_oldest","latest":"example_latest","cursor":"example_cursor"}' --json copy
slack.slack_get_thread_replies Read read Get all replies in a Slack message thread.
channel, ts, limit, cursor kosmo integrations:call slack.slack_get_thread_replies '{"channel":"example_channel","ts":"example_ts","limit":1,"cursor":"example_cursor"}' --json copy kosmo integrations:slack slack_get_thread_replies '{"channel":"example_channel","ts":"example_ts","limit":1,"cursor":"example_cursor"}' --json copy
slack.slack_list_channels Read read List all Slack channels the bot has access to.
types, exclude_archived, limit, cursor kosmo integrations:call slack.slack_list_channels '{"types":"example_types","exclude_archived":true,"limit":1,"cursor":"example_cursor"}' --json copy kosmo integrations:slack slack_list_channels '{"types":"example_types","exclude_archived":true,"limit":1,"cursor":"example_cursor"}' --json copy
slack.slack_get_channel Read read Get detailed information about a Slack channel.
channel kosmo integrations:call slack.slack_get_channel '{"channel":"example_channel"}' --json copy kosmo integrations:slack slack_get_channel '{"channel":"example_channel"}' --json copy
slack.slack_create_channel Write write Create a new Slack channel.
name, is_private kosmo integrations:call slack.slack_create_channel '{"name":"example_name","is_private":true}' --json copy kosmo integrations:slack slack_create_channel '{"name":"example_name","is_private":true}' --json copy
slack.slack_set_topic Write write Set the topic for a Slack channel.
channel, topic kosmo integrations:call slack.slack_set_topic '{"channel":"example_channel","topic":"example_topic"}' --json copy kosmo integrations:slack slack_set_topic '{"channel":"example_channel","topic":"example_topic"}' --json copy
slack.slack_set_purpose Write write Set the purpose for a Slack channel.
channel, purpose kosmo integrations:call slack.slack_set_purpose '{"channel":"example_channel","purpose":"example_purpose"}' --json copy kosmo integrations:slack slack_set_purpose '{"channel":"example_channel","purpose":"example_purpose"}' --json copy
slack.slack_archive_channel Write write Archive a Slack channel.
channel kosmo integrations:call slack.slack_archive_channel '{"channel":"example_channel"}' --json copy kosmo integrations:slack slack_archive_channel '{"channel":"example_channel"}' --json copy
slack.slack_invite_to_channel Write write Invite one or more users to a Slack channel.
channel, users kosmo integrations:call slack.slack_invite_to_channel '{"channel":"example_channel","users":"example_users"}' --json copy kosmo integrations:slack slack_invite_to_channel '{"channel":"example_channel","users":"example_users"}' --json copy
slack.slack_upload_file Write write Upload a file to Slack using the modern external upload flow. The file content is posted to a channel or as a thread reply.
channel, content, filename, title, initial_comment, thread_ts kosmo integrations:call slack.slack_upload_file '{"channel":"example_channel","content":"example_content","filename":"example_filename","title":"example_title","initial_comment":"example_initial_comment","thread_ts":"example_thread_ts"}' --json copy kosmo integrations:slack slack_upload_file '{"channel":"example_channel","content":"example_content","filename":"example_filename","title":"example_title","initial_comment":"example_initial_comment","thread_ts":"example_thread_ts"}' --json copy
slack.slack_list_files Read read List files in Slack, optionally filtered by channel, user, or file type.
channel, user, types, count, page kosmo integrations:call slack.slack_list_files '{"channel":"example_channel","user":"example_user","types":"example_types","count":1,"page":1}' --json copy kosmo integrations:slack slack_list_files '{"channel":"example_channel","user":"example_user","types":"example_types","count":1,"page":1}' --json copy
slack.slack_get_file Read read Get detailed information about a Slack file.
file kosmo integrations:call slack.slack_get_file '{"file":"example_file"}' --json copy kosmo integrations:slack slack_get_file '{"file":"example_file"}' --json copy
slack.slack_list_users Read read List all users in the Slack workspace.
limit, cursor, include_locale kosmo integrations:call slack.slack_list_users '{"limit":1,"cursor":"example_cursor","include_locale":true}' --json copy kosmo integrations:slack slack_list_users '{"limit":1,"cursor":"example_cursor","include_locale":true}' --json copy
slack.slack_get_user Read read Get detailed information about a Slack user by their user ID.
user kosmo integrations:call slack.slack_get_user '{"user":"example_user"}' --json copy kosmo integrations:slack slack_get_user '{"user":"example_user"}' --json copy
slack.slack_find_user_by_email Read read Look up a Slack user by their email address.
email kosmo integrations:call slack.slack_find_user_by_email '{"email":"example_email"}' --json copy kosmo integrations:slack slack_find_user_by_email '{"email":"example_email"}' --json copy
slack.slack_add_reaction Write write Add an emoji reaction to a Slack message.
channel, name, timestamp kosmo integrations:call slack.slack_add_reaction '{"channel":"example_channel","name":"example_name","timestamp":"example_timestamp"}' --json copy kosmo integrations:slack slack_add_reaction '{"channel":"example_channel","name":"example_name","timestamp":"example_timestamp"}' --json copy
slack.slack_remove_reaction Write write Remove an emoji reaction from a Slack message.
channel, name, timestamp kosmo integrations:call slack.slack_remove_reaction '{"channel":"example_channel","name":"example_name","timestamp":"example_timestamp"}' --json copy kosmo integrations:slack slack_remove_reaction '{"channel":"example_channel","name":"example_name","timestamp":"example_timestamp"}' --json copy
slack.slack_list_usergroups Read read List all usergroups in the Slack workspace.
include_count, include_disabled, include_users kosmo integrations:call slack.slack_list_usergroups '{"include_count":true,"include_disabled":true,"include_users":true}' --json copy kosmo integrations:slack slack_list_usergroups '{"include_count":true,"include_disabled":true,"include_users":true}' --json copy
slack.slack_update_usergroup_members Write write Update the members of a Slack usergroup.
usergroup, users kosmo integrations:call slack.slack_update_usergroup_members '{"usergroup":"example_usergroup","users":"example_users"}' --json copy kosmo integrations:slack slack_update_usergroup_members '{"usergroup":"example_usergroup","users":"example_users"}' --json copy Function Schemas Use these parameter tables when building CLI payloads without calling integrations:schema first.
Operation Write write
Schema command kosmo integrations:schema slack.slack_send_message --json
Operation Write write
Schema command kosmo integrations:schema slack.slack_update_message --json
Operation Write write
Schema command kosmo integrations:schema slack.slack_delete_message --json
Operation Read read
Schema command kosmo integrations:schema slack.slack_get_message --json
Operation Read read
Schema command kosmo integrations:schema slack.slack_search_messages --json
Operation Read read
Schema command kosmo integrations:schema slack.slack_get_permalink --json
Operation Read read
Schema command kosmo integrations:schema slack.slack_get_channel_history --json
Operation Read read
Schema command kosmo integrations:schema slack.slack_get_thread_replies --json
Operation Read read
Schema command kosmo integrations:schema slack.slack_list_channels --json
Operation Read read
Schema command kosmo integrations:schema slack.slack_get_channel --json
Operation Write write
Schema command kosmo integrations:schema slack.slack_create_channel --json
Operation Write write
Schema command kosmo integrations:schema slack.slack_set_topic --json
Operation Write write
Schema command kosmo integrations:schema slack.slack_set_purpose --json
Operation Write write
Schema command kosmo integrations:schema slack.slack_archive_channel --json
Operation Write write
Schema command kosmo integrations:schema slack.slack_invite_to_channel --json
Operation Write write
Schema command kosmo integrations:schema slack.slack_upload_file --json
Operation Read read
Schema command kosmo integrations:schema slack.slack_list_files --json
Operation Read read
Schema command kosmo integrations:schema slack.slack_get_file --json
Operation Read read
Schema command kosmo integrations:schema slack.slack_list_users --json
Operation Read read
Schema command kosmo integrations:schema slack.slack_get_user --json
Operation Read read
Schema command kosmo integrations:schema slack.slack_find_user_by_email --json
Operation Write write
Schema command kosmo integrations:schema slack.slack_add_reaction --json
Operation Write write
Schema command kosmo integrations:schema slack.slack_remove_reaction --json
Operation Read read
Schema command kosmo integrations:schema slack.slack_list_usergroups --json
Operation Write write
Schema command kosmo integrations:schema slack.slack_update_usergroup_members --json 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.