forum
cmdhub adapter

Slack CLI
for cmdhub.

Channels, conversations, messages, threads, reactions, and users.

lock Auth: OAuth2
Quick Install cmdhub get slack

data_object Agent Contract

Agents should start with auth/status and discovery commands, inspect schemas before composition, and treat commands marked as mutating as state-changing operations.

Output

Use human output for reading, `--json` for one object, and `--jsonl` for pipes.

Auth

Slack OAuth. Used for conversations, messages, threads, reactions, search, and users.

Refs

Prefer list/search, then short refs or piped JSONL. Use `resolve` to inspect cached refs.

Schemas

Use `slack schema` and `catalog.json` to inspect fields, flags, examples, and side effects.

Auth scopes

channels:readgroups:readim:readmpim:readchannels:historygroups:historyim:historympim:historychannels:writegroups:writechat:writeusers:readusers:read.emailreactions:readreactions:writesearch:read

terminal Command Reference

Generated from source. Global flags apply to all commands.

Global Flags

--json bool Emit JSON machine output
--jsonl bool Emit JSONL records for piping
--output, -o string Compatibility output mode: json|jsonl. Prefer --json or --jsonl
--view string = summary View mode: summary|full
--profile string = default Config/auth profile
--config string Config path override
--quiet, -q bool Suppress non-essential diagnostics
--debug bool Enable debug diagnostics
--limit int = 50 Maximum items to emit
--page-size int = 50 Requested upstream page size
--cursor string Continuation cursor
--no-paginate bool Fetch only one page
--version, -v bool Print version information
slack auth Manage Slack authentication
#cmd-slack-auth discovery safe
slack auth login Start Slack OAuth login
#cmd-slack-auth-login mutates state
$ slack --profile work auth login
$ slack auth login
$ slack auth login --help
slack auth logout Clear auth state
#cmd-slack-auth-logout mutates state
$ slack --profile work auth logout
$ slack auth logout
$ slack auth logout --help
slack auth refresh Validate stored Slack token
#cmd-slack-auth-refresh mutates state
$ slack auth refresh
$ slack auth refresh --help
$ slack auth refresh --json
slack auth status Show auth status
#cmd-slack-auth-status discovery safe
$ slack auth status
$ slack auth status --help
$ slack auth status --json
$ slack auth whoami
slack auth whoami Show the authenticated Slack user
#cmd-slack-auth-whoami discovery safe
$ slack auth whoami
$ slack auth whoami --help
$ slack auth whoami --json
slack capabilities Describe capabilities
#cmd-slack-capabilities discovery safe
$ slack capabilities --help
slack channel Work with channels
#cmd-slack-channel discovery safe

Inspect, join, and leave Slack channels.

List channels first when you need short refs such as c1 or want to inspect valid channel identifiers. If you already know the channel name, channel get can be a faster first step than channel list.

slack channel archive Archive a channel
#cmd-slack-channel-archive mutates state
Archive one Slack channel by id, name, short ref, or one piped channel item. This changes channel visibility and requires –yes.
--id string Channel id or name
--yes bool Confirm archiving the channel
$ slack channel archive --help
$ slack channel archive c1 --yes
slack channel create Create a channel
#cmd-slack-channel-create mutates state
Create one Slack channel by name. Use –private for a private channel.
--name string New channel name
--private bool Create a private channel
$ slack channel create --help
$ slack channel create --name cmdhub-eval-updates
$ slack channel create --name cmdhub-private --private
slack channel get Get one channel by id or name
#cmd-slack-channel-get discovery safe

Get one Slack channel by id, name, short ref, or one piped channel item.

Prefer this when you already know the channel name and want the canonical channel id without scanning the full channel list first.

--id string Channel id or name
$ slack channel get
$ slack channel get c1
$ slack channel get cmdhub-evals-a
$ slack channel get general
$ slack channel list --limit 1 --jsonl | slack channel get
slack channel join Join a public channel
#cmd-slack-channel-join discovery safe
Join one public Slack channel by id, name, short ref, or one piped channel item.
--id string Channel id or name
$ slack channel join --help
$ slack channel join c1
$ slack channel join general
slack channel leave Leave a channel
#cmd-slack-channel-leave discovery safe
Leave one Slack channel by id, name, short ref, or one piped channel item.
--id string Channel id or name
$ slack channel leave --help
$ slack channel leave c1
$ slack channel leave general
slack channel list List channels
#cmd-slack-channel-list discovery safe

List Slack channels and cache local channel refs such as c1.

Use –jsonl when the next step should consume one channel item from stdin. If you already know the channel name, channel get can be faster than listing first.

$ slack channel get cmdhub-evals-a
$ slack channel list
$ slack channel list --limit 1 --jsonl | slack channel get
$ slack channel list --limit 10
slack channel purpose Set a channel purpose
#cmd-slack-channel-purpose discovery safe
Set the purpose for one Slack channel by id, name, short ref, or one piped channel item.
--id string Channel id or name
--purpose string Channel purpose text
$ slack channel purpose --help
$ slack channel purpose --id cmdhub-evals-a --purpose 'Low-value test channel'
$ slack channel purpose c1 --purpose 'Coordinate cmdhub evals'
slack channel rename Rename a channel
#cmd-slack-channel-rename discovery safe
Rename one Slack channel by id, name, short ref, or one piped channel item.
--id string Channel id or name
--name string New channel name
$ slack channel rename --help
$ slack channel rename --id cmdhub-eval-old --name cmdhub-eval-new
$ slack channel rename c1 --name cmdhub-eval-renamed
slack channel topic Set a channel topic
#cmd-slack-channel-topic discovery safe
Set the topic for one Slack channel by id, name, short ref, or one piped channel item.
--id string Channel id or name
--topic string Channel topic text
$ slack channel topic --help
$ slack channel topic --id cmdhub-evals-a --topic 'Eval workspace'
$ slack channel topic c1 --topic 'Daily coordination'
slack channel unarchive Unarchive a channel
#cmd-slack-channel-unarchive mutates state
Unarchive one Slack channel by id, name, short ref, or one piped channel item.
--id string Channel id or name
$ slack channel unarchive --help
$ slack channel unarchive c1
slack config Inspect local configuration
#cmd-slack-config discovery safe
slack config explain Explain resolved configuration
#cmd-slack-config-explain discovery safe
$ slack config explain --help
slack conversation Work with Slack conversations
#cmd-slack-conversation discovery safe
Inspect Slack conversations, including channels and other conversation types exposed by the API.
slack conversation get Get one conversation by id or name
#cmd-slack-conversation-get discovery safe
Get one Slack conversation by id, name, short ref, or one piped conversation item.
--id string Conversation id or name
$ slack conversation get
$ slack conversation get general
$ slack conversation get v1
slack conversation list List conversations visible to the current user
#cmd-slack-conversation-list discovery safe

List Slack conversations and cache local conversation refs such as v1.

Use conversation commands when you want a broader Slack conversation view that can include channels, DMs, and MPIMs.

--types string = public_channel,private_channel,im,mpim Conversation types
$ slack conversation list
$ slack conversation list --limit 10
$ slack conversation list --types public_channel,private_channel --limit 10
slack conversation open Open a DM or group DM
#cmd-slack-conversation-open discovery safe

Open a Slack DM or MPIM with exact users.

Pass –user one or more times with a user id, username, email-like handle already resolvable by Slack user lookup, or cached user ref from user list.

--user stringArray = [] User id, name, or short ref to include
$ slack conversation open --help
$ slack conversation open --user U12345678 --user U23456789
$ slack conversation open --user p1
slack doctor Run Slack adapter diagnostics
#cmd-slack-doctor discovery safe
$ slack doctor
$ slack doctor --help
$ slack doctor --json
slack login Start Slack OAuth login
#cmd-slack-login mutates state
$ slack --profile work login
$ slack login
slack logout Clear auth state
#cmd-slack-logout mutates state
$ slack --profile work logout
$ slack logout
slack message Work with Slack messages
#cmd-slack-message discovery safe

List, inspect, create, reply to, update, and delete Slack messages.

List first when you want short refs such as m1 or want to drive follow-up actions through jsonl pipes.

slack message create Create a message in a channel
#cmd-slack-message-create mutates state

Create a Slack message in one channel.

Pass –channel with a channel name, conversation id, or cached short ref, then provide –text.

--channel string Target channel id or name
--text string Message text
$ slack message create --channel c1 --text 'hello'
$ slack message create --channel general --text 'hello'
$ slack message create --help
slack message delete Delete one or more of your messages
#cmd-slack-message-delete mutates state

Delete one of your Slack messages.

The target may come from explicit –channel and –ts values, a cached message ref, or one piped message item.

--all bool Confirm batch message deletion
--channel string Channel id or name
--ts string Message timestamp
--yes bool Confirm destructive batch message deletion
$ slack message delete --channel general --ts 171.0001
$ slack message delete --help
$ slack message delete m1
slack message get Get one or more messages by timestamp
#cmd-slack-message-get discovery safe

Get one Slack message in detail.

The target may be:

  • –channel plus –ts
  • a cached message ref such as m1
  • one piped message item from stdin

Use message get after message list when you need the channel-scoped details for a single match. For JSONL recovery, pipe exactly one message item from message list or channel-scoped search into this command. Do not pass –json together with –jsonl; –json is for one response, –jsonl is for pipelines.

--channel string Channel id or name
--ts string Slack message timestamp
$ slack message get
$ slack message get --channel general --ts 171.0001
$ slack message get m1
$ slack message list --channel cmdhub-evals-a --limit 1 --jsonl | slack message get
$ slack message list --channel general --limit 1 --jsonl | slack message get
slack message list List recent messages from a channel
#cmd-slack-message-list discovery safe

List recent Slack messages from one channel and cache local message refs such as m1.

Those message refs can often be used directly by message get, message reply, reaction add, and thread get because the cached reference carries both channel and ts. If you know the channel already, prefer message list over search.message for seeded or recent channel-local work. For recovery after a broad search misses, use –channel with –query, emit –jsonl, and pipe the one matching item into message get. Use –json for one structured response or –jsonl for item streams; they are mutually exclusive.

--channel string Channel id or name
--query string Text query to match message text
$ slack message list
$ slack message list --channel cmdhub-evals-a --limit 10
$ slack message list --channel cmdhub-evals-a --query eval-slack-msg-123
$ slack message list --channel general --limit 1 --jsonl | slack message get
$ slack message list --channel general --limit 1 --jsonl | slack reaction add --name eyes
$ slack message list --channel general --limit 10
slack message reply Reply in a thread
#cmd-slack-message-reply mutates state

Reply in a Slack thread.

The target may be:

  • –channel plus –ts
  • a cached message ref such as m1
  • one piped message or thread item from stdin
--channel string Channel id or name
--text string Reply text
--ts string Root message timestamp
$ slack message list --channel general --limit 1 --jsonl | slack message reply --text 'Following up here.'
$ slack message reply --channel general --ts 171.0001 --text 'Following up here.'
$ slack message reply --help
$ slack message reply m1 --text 'Following up here.'
slack message update Update one of your messages
#cmd-slack-message-update mutates state

Update one of your Slack messages.

The target may come from explicit –channel and –ts values, a cached message ref, or one piped message item.

--channel string Channel id or name
--text string Updated text
--ts string Message timestamp
$ slack message update --channel general --ts 171.0001 --text 'Updated text'
$ slack message update --help
$ slack message update m1 --text 'Updated text'
slack profile Manage provider profiles
#cmd-slack-profile discovery safe
slack profile create Create an unauthenticated provider profile
#cmd-slack-profile-create mutates state
$ slack profile create --help
slack profile delete Delete a local provider profile
#cmd-slack-profile-delete mutates state
$ slack profile delete --help
slack profile list List provider profiles
#cmd-slack-profile-list discovery safe
$ slack profile list --help
slack profile rename Rename a local provider profile
#cmd-slack-profile-rename discovery safe
$ slack profile rename --help
slack profile use Set the default provider profile
#cmd-slack-profile-use mutates state
$ slack profile use --help
slack reaction Work with message reactions
#cmd-slack-reaction discovery safe

List, add, and remove reactions on Slack messages.

These commands work best with a piped message item or a cached message ref such as m1. Use –jsonl when a message list/search result should feed a reaction command; do not combine –json with –jsonl.

slack reaction add Add a reaction to a message
#cmd-slack-reaction-add mutates state

Add one reaction to a Slack message.

The target may come from explicit –channel and –ts values, a cached message ref, or one piped message item. For recovery, run message list with –channel and –query, then pipe one –jsonl item into this command.

--channel string Channel id or name
--name string Emoji name without colons
--ts string Message timestamp
--yes bool Accepted for compatibility; confirmation is unnecessary for one exact reaction add
$ slack message list --channel general --limit 1 --jsonl | slack reaction add --name eyes
$ slack reaction add --channel general --ts 171.0001 --name eyes
$ slack reaction add --help
$ slack reaction add m1 --name eyes
slack reaction list List reactions on a message
#cmd-slack-reaction-list discovery safe

List reactions for one Slack message.

The target may come from explicit –channel and –ts values, a cached message ref, or one piped message item. For recovery, run message list with –channel and –query, then pipe one –jsonl item into this command.

--channel string Channel id or name
--ts string Message timestamp
$ slack reaction list
$ slack reaction list --channel general --ts 171.0001
$ slack reaction list m1
slack reaction remove Remove your reaction from a message
#cmd-slack-reaction-remove mutates state

Remove one of your reactions from a Slack message.

The target may come from explicit –channel and –ts values, a cached message ref, or one piped message item. For recovery, run message list with –channel and –query, then pipe one –jsonl item into this command.

--channel string Channel id or name
--name string Emoji name without colons
--ts string Message timestamp
--yes bool Accepted for compatibility; confirmation is unnecessary for one exact reaction removal
$ slack reaction remove --channel general --ts 171.0001 --name eyes
$ slack reaction remove --help
$ slack reaction remove m1 --name eyes
slack resolve Resolve a Slack local marker or stored short reference
#cmd-slack-resolve discovery safe

Resolve a Slack short reference into its canonical payload.

Use this when you have a marker such as c1, v1, p1, m1, or u1, or a stored short id such as C2H…5FA, and want to inspect what it refers to.

Resolution is profile-scoped. If a marker does not resolve, verify –profile and rerun the relevant list command.

$ slack resolve --help
$ slack resolve C2H...5FA
$ slack resolve c1
$ slack resolve m1
slack schema Emit Slack adapter schema hints
#cmd-slack-schema discovery safe

Show schema hints for the Slack resource payloads emitted by this CLI.

Use this when you need to understand structured output fields for automation or downstream parsing.

--in bool Show input schema
--input bool Show input schema
--out bool Show output schema
--schema-output bool Show output schema
$ slack schema
$ slack schema --help
$ slack schema message.create --in --json
$ slack schema message.get --out --json
slack thread Work with Slack threads
#cmd-slack-thread discovery safe

Inspect Slack threads and their replies.

These commands work best with a piped message item or a cached message ref such as m1.

slack thread get Get a thread and its replies
#cmd-slack-thread-get discovery safe

Get a Slack thread and its replies.

The target may come from explicit –channel and –ts values, a cached message ref, or one piped message or thread item.

--channel string Channel id or name
--ts string Root message timestamp
$ slack message list --channel general --limit 1 --jsonl | slack thread get
$ slack thread get
$ slack thread get --channel general --ts 171.0001
$ slack thread get m1
slack user Work with Slack users
#cmd-slack-user discovery safe
List and inspect Slack users visible to the active token.
slack user get Get one user by id or name
#cmd-slack-user-get discovery safe
Get one Slack user by id, name, short ref, or one piped user item.
--id string User id or name
$ slack user get
$ slack user get alice
$ slack user get p1
slack user list List users
#cmd-slack-user-list discovery safe
List active Slack users and cache local user refs such as p1.
--include-deactivated bool Include deactivated Slack accounts
$ slack user list
$ slack user list --include-deactivated
$ slack user list --json
$ slack user list --limit 20
slack version Show slack version information
#cmd-slack-version discovery safe
$ slack version --help

play_circle Live Examples

Output captured from a real workspace. Regenerate with scripts/gen-docs.sh --update.

auth

Check current identity
$ slack auth whoami
Authenticated as sterne@gmail.com
Field         Value
------------  -----
Workspace     Stochastic Consulting
Workspace ID  {id}
User          philip
User ID       {id}
Email         sterne@gmail.com

Next steps:
- Capabilities:       slack capabilities
- List conversations: slack conversation list --limit 10
- List messages:      slack message list --channel general --limit 10

channels

List channels
$ slack channel list --limit 5
REF  TITLE           WHEN
c1   general         1.776093411299e+12
c2   random          1.724289881022e+12
c3   announcements   1.771492396484e+12
c4   friendscompete  1.771492396541e+12
c5   africanbank     1.771492396748e+12

Next steps:
- Open:         slack channel get c1
- Channels:     slack channel list
- Messages:     slack message list --channel general --limit 10
- Capabilities: slack capabilities
Get a channel
$ slack channel get c1
NOT_FOUND: channel not found Next steps: - Channels: slack channel list --limit 10 - Messages: slack message list --channel general --limit 10 - Help: slack --help exit status 50

messages

List channel messages
$ slack message list --channel cmdhub-evals-a --limit 3
REF  TITLE
m1   This message was deleted.
m2   This message was deleted.
m3   This message was deleted.

Next steps:
- Open:         slack message get m1
- Channels:     slack channel list
- Messages:     slack message list --channel general --limit 10
- Capabilities: slack capabilities
Get a message
$ slack message get m1
INVALID_ARGUMENT: missing message selector Next steps: - Channels: slack channel list --limit 10 - Messages: slack message list --channel general --limit 10 - Help: slack message --help exit status 2

search

Search messages
$ slack search message --query eval
Messages matching "eval"
REF  CHANNEL                        TS                 AUTHOR     TEXT
m1   #cmdhub-evals-a ({id})  {id}.203869  {id}  eval-slack-post-delete-grow-natural-civil reply message
m2   #cmdhub-evals-a ({id})  {id}.382739  {id}  eval-slack-post-delete-term-beginning-hate reply message
m3   #cmdhub-evals-a ({id})  {id}.412719  {id}  eval-slack-post-delete-towards-favorite-growing reply message
m4   #general ({id})           {id}.266959  {id}  eval-slack-post-delete-missing-fast-wanted reply message
m5   #general ({id})           {id}.702329  {id}  Source event eval-agent-pipe-gcal-slack-review-table-comes: Pipe Slack source event eval-agen...
m6   #cmdhub-evals-a ({id})  {id}.994769  {id}  eval-slack-post-delete-related-wish-thing reply message
m7   #cmdhub-evals-a ({id})  {id}.347989  {id}  eval-slack-post-delete-word-hope-created reply message
m8   #cmdhub-evals-a ({id})  {id}.139219  {id}  Event: Pipe Slack source event eval-agent-pipe-gcal-slack-{id} | Description: Post a Sl...
m9   #cmdhub-evals-a ({id})  {id}.069399  {id}  Event: Pipe Slack source event eval-agent-pipe-gcal-slack-{id} | Summary: Pipe Slack so...
m10  #cmdhub-evals-a ({id})  {id}.991189  {id}  Pipe Slack source event eval-agent-pw...
m11  #cmdhub-evals-a ({id})  {id}.805279  {id}  eval-slack-post-delete-{id} root message
m12  #cmdhub-evals-a ({id})  {id}.330609  {id}  Pipe Slack source event eval-agent-pipe-gcal-slack-{id}
m13  #cmdhub-evals-a ({id})  {id}.777579  {id}  Pipe Slack source event eval-agent-pipe-gcal-slack-{id}: roadmap risk reviewed, launch ...
m14  #cmdhub-evals-a ({id})  {id}.913129  {id}  Pipe Slack source event eval-agent-pipe-gcal-slack-{id}: roadmap risk reviewed, launch ...
m15  #cmdhub-evals-a ({id})  {id}.011309  {id}  Pipe Slack source event eval-agent-pipe-gcal-slack-{id}: roadmap risk reviewed, launch ...
m16  #cmdhub-evals-a ({id})  {id}.810639  {id}  Post a Slack status update for eval-agent-pipe-gcal-slack-{id}: roadmap risk reviewed, ...
m17  #cmdhub-evals-a ({id})  {id}.769679  {id}  Pipe Slack source event eval-agent-pipe-gcal-slack-{id}
m18  #cmdhub-evals-a ({id})  {id}.864679  {id}  Pipe Slack source event eval‑...

Next steps:
- Open:           slack message get m1
- List channel:   slack message list --channel {id} --limit 10
- Search example: slack search message --query roadmap --limit 10

users

List workspace members
$ slack user list --limit 5
REF  TITLE          WHEN
p1   slackbot       0
p2   philip         1.603991453e+09
p3   carlscheffler  1.569031072e+09
p4   slack1         1.530883443e+09

Next steps:
- Open:         slack user get p1
- Channels:     slack channel list
- Messages:     slack message list --channel general --limit 10
- Capabilities: slack capabilities

alt_route Composition Patterns

Bridge your ecosystem with zero middleware.

# Pull one recent message and inspect the whole thread
slack message list --channel general --limit 1 --jsonl \
  | slack thread get