| name | slack |
| description | Interact with Slack workspaces. Use for reading channels/messages, sending messages, searching, managing threads, reactions, and uploading files. |
Slack
Read and write messages, search, manage threads, add reactions, and upload files in Slack.
Environment Variables
SLACK_ACCESS_TOKEN - Slack user OAuth token (required for --as user and read operations)
SLACK_BOT_RELAY_URL - Optional relay endpoint for posting as bot
SLACK_BOT_RELAY_SECRET - Secret for relay auth (required with --as bot)
Commands
slack channels [-l limit]
slack history -c <channelId> [-l limit]
slack recent [-l limit] [-q "filter query"]
slack send -c <channelId> -t "Hello team" --as <user|bot> [--thread <ts>]
slack search -q "deployment failed" [-l limit]
slack users [-l limit]
slack user -u <userId>
slack thread -c <channelId> --thread <parentTs>
slack react -c <channelId> --ts <messageTs> -e thumbsup
slack upload -c <channelId> -f ./report.pdf [--filename report.pdf] [--title "Q4 Report"] [--text "Here's the report"] [--thread <ts>]
Message Formatting
send --text and upload --text accept common Markdown for headings, bullets, nested bullets, bold, italic, strikethrough, links, and tables.
- The CLI converts common Markdown into Slack mrkdwn and Slack blocks before sending.
Output Format
JSON arrays. Example for history:
[
{ "ts": "1705312800.000100", "user": "U01ABC", "text": "Hello!", "thread": null, "replies": 0 }
]