Slack workspace access. Surfaces new messages, active threads, and channel activity. Can also send messages and replies.
84
84%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Advisory
Suggest reviewing before use
channels listList all channels the user is a member of.
slack-cli channels list [--active-since <datetime>] [--markdown]Flags:
--active-since <datetime> — ISO datetime. Only return channels with activity since this time. Checks both new top-level messages and thread replies (a channel counts as active if any thread in it received a new reply, even if the thread started before --active-since).--markdown — Human-readable output instead of JSON.Output fields (JSON):
[
{
"id": "C012AB3CD",
"name": "product",
"topic": "Product team discussions",
"purpose": "Roadmap, decisions, and feature work",
"num_members": 12,
"last_active": "2026-03-20T10:34:12.000Z" // null when --active-since not used
}
]Example:
# All joined channels
slack-cli channels list --markdown
# Channels active in the last hour
slack-cli channels list --active-since "2026-03-20T09:00:00Z" --markdownmessages listFetch messages in a channel since a given datetime — including thread roots with new replies, even when the root was posted before --since. Automatically marks the channel as read up to the latest message fetched.
slack-cli messages list --channel <channel-id> --since <datetime> [--markdown]Required flags:
--channel <channel-id> — Slack channel ID (e.g. C012AB3CD)--since <datetime> — ISO datetime. Returns:
has_new_replies: true)Optional flags:
--markdown — Human-readable output.Output fields (JSON):
[
{
"ts": "1742463252.000001",
"time": "2026-03-20T10:34:12.000Z",
"sender": "Alice",
"text": "Should we move the launch to next week?",
"is_thread_root": true,
"reply_count": 4,
"latest_reply": "2026-03-20T11:02:00.000Z",
"has_new_replies": true,
"is_thread_reply": false,
"thread_ts": null
}
]Notes:
has_new_replies: true, use thread get to fetch the full thread.Example:
slack-cli messages list --channel C012AB3CD --since "2026-03-20T09:00:00Z" --markdownmessages sendSend a message to a channel or reply in a thread.
slack-cli messages send --channel <channel-id> --text <text> [--thread-id <ts>] [--markdown]Required flags:
--channel <channel-id> — Slack channel ID (e.g. C012AB3CD)--text <text> — message bodyOptional flags:
--thread-id <ts> — reply in a thread by passing the parent message's ts (Slack uses ts as the thread ID)--markdown — Human-readable confirmation instead of JSON.Output fields (JSON):
{
"ok": true,
"channel": "C012AB3CD",
"ts": "1742463300.000001",
"thread_ts": "1742463252.000001" // only present when replying in a thread
}Error handling:
If the Slack token doesn't have the chat:write scope, the CLI exits with a clear error. This means you don't have permission to send messages — do not treat it as a fatal failure.
Example:
# Post to a channel
slack-cli messages send --channel C012AB3CD --text "Heads up: deploy starting now"
# Reply in a thread
slack-cli messages send --channel C012AB3CD --text "Done!" --thread-id 1742463252.000001thread getFetch the full thread for a given message — the parent message plus all replies. Automatically marks the channel as read up to the latest message in the thread.
slack-cli thread get --channel <channel-id> --id <message-id> [--markdown]Required flags:
--channel <channel-id> — Slack channel ID where the thread lives--id <message-id> — the ID of the parent (root) message. Use the ts field from messages list for any message where is_thread_root: true. Note: in Slack's API, ts is the unique message identifier — it looks like a Unix timestamp but is used as an opaque ID. There is no separate "id" field.Optional flags:
--markdown — Human-readable output.Output fields (JSON):
{
"channel": "C012AB3CD",
"thread_id": "1742463252.000001",
"message_count": 5,
"messages": [
{
"ts": "1742463252.000001",
"time": "2026-03-20T10:34:12.000Z",
"sender": "Alice",
"text": "Should we move the launch to next week?",
"is_parent": true
},
{
"ts": "1742463300.000001",
"time": "2026-03-20T10:35:00.000Z",
"sender": "Bob",
"text": "Yes, the integration isn't ready.",
"is_parent": false
}
]
}Example:
slack-cli thread get --channel C012AB3CD --id 1742463252.000001 --markdownsearchSearch messages across all accessible channels.
slack-cli search --query <string> [--count <n>] [--page <n>] [--markdown]Required flags:
--query <string> — search query (supports Slack search modifiers like in:#channel, from:@user)Optional flags:
--count <n> — results per page (default: 20)--page <n> — 1-indexed page number for paginating through results (default: 1)--markdown — Human-readable output.Example:
slack-cli search --query "launch date" --count 10 --markdown
slack-cli search --query "in:#product decision" --markdown
# Fetch the next page of results
slack-cli search --query "launch date" --count 10 --page 2 --markdownchannels mark-readMark a channel as read up to a given timestamp. This is called automatically after messages list and thread get — you usually don't need to call it directly. Do not call this manually in automated check-in workflows; only use it when explicitly asked.
slack-cli channels mark-read --channel <channel-id> --until <timestamp> [--markdown]Required flags:
--channel <channel-id> — Slack channel ID--until <timestamp> — mark as read up to this Slack timestamp (the ts of the last message processed)Example:
slack-cli channels mark-read --channel C012AB3CD --until 1742463252.000001