with one click
slack-cli
// Reference for using slck (aliased as `slack`) to manage Slack channels, messages, users, and search from the terminal. Use when the user mentions Slack messaging, channel management, or workspace communication.
// Reference for using slck (aliased as `slack`) to manage Slack channels, messages, users, and search from the terminal. Use when the user mentions Slack messaging, channel management, or workspace communication.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | slack-cli |
| description | Reference for using slck (aliased as `slack`) to manage Slack channels, messages, users, and search from the terminal. Use when the user mentions Slack messaging, channel management, or workspace communication. |
slack)slck uses a stored bot token (xoxb-). Verify with slack config show.
Search requires a user token (xoxp-). Set via slack config set-token or SLACK_USER_TOKEN env var.
slack ch list # All channels
slack ch list --exclude-archived # Active only
slack ch list --type public # Public only
slack ch get C0123456789 # Details (channel metadata + member count)
slack ch create "name" --public # Create
slack ch archive C0123456789 # Archive
slack ch unarchive C0123456789 # Unarchive (user token only)
slack ch rename C0123456789 "new-name" # Rename
slack ch invite C0123456789 -u U0123456789 # Invite user
slack ch kick C0123456789 -u U0123456789 # Remove user
slack ch set-topic C0123456789 "topic" # Set topic
slack ch set-purpose C0123456789 "purpose" # Set purpose
slack msg send C0123456789 "text" # Send
slack msg send C0123456789 "reply" --thread-ts TS # Thread reply
slack msg send C0123456789 --file ./doc.pdf # Upload file
slack msg send --channel "#general" "text" # By channel name
slack msg update C0123 TS "new text" # Edit
slack msg delete C0123 TS # Delete
slack msg react C0123 TS thumbsup # React
slack msg unreact C0123 TS thumbsup # Remove reaction
slack msg history C0123456789 # Channel history
slack msg history C0123456789 --limit 50 # With limit
slack msg thread C0123 THREAD_TS # Thread replies (parent + all replies)
slack msg thread C0123 THREAD_TS --limit 200 # Higher page size
slack u list # All users
slack u list --include-bots # Include bots
slack u list --include-deactivated # Include deactivated
slack u get U0123456789 # User details
slack u presence U0123456789 # Presence status
slack s messages "query" # Messages
slack s messages "query" --in "#general" # In channel
slack s messages "query" --from "@alice" # From user
slack s messages "query" --after 2025-01-01 # Date filter
slack s messages "query" --has-link # With links
slack s files "query" # Files
slack s files "query" --type pdf # By type
slack s all "query" # Both
| Flag | Description |
|---|---|
--count N | Results per page (max 100) |
--page N | Page number |
--sort score|timestamp | Sort order |
--sort-dir asc|desc | Direction |
--scope all|public|private|dm|mpim | Scope |
--highlight | Highlight matches |
slack emoji list # Custom emoji
slack emoji list --include-aliases # With aliases
slack files download FILE_ID # Download file
slack files download FILE_ID --output ./file.pdf # To path
slack whoami # Current identity
slack ws info # Workspace info
slack ch list # Text (default)
slack ch list -o json # JSON
slack ch list -o table # Table
| Variable | Description |
|---|---|
SLACK_API_TOKEN | Bot token override |
SLACK_USER_TOKEN | User token for search |
SLCK_AS_USER | true to default to user token |
NO_COLOR | Disable colored output |
| Command | Aliases |
|---|---|
channels | ch |
messages | msg, m |
users | u |
search | s |
emoji | e |
workspace | ws, team |
slack config set-token # Interactive
slack config set-token xoxb-... # Direct
slack config show # Status
slack config test # Test auth
slack config delete-token # Delete all
slack config delete-token --type bot # Delete bot only
slack completion zsh > "${fpath[1]}/_slck"
slack completion bash > /etc/bash_completion.d/slck
slack completion fish > ~/.config/fish/completions/slck.fish
URL shape: https://<ws>.slack.com/archives/<CHANNEL_ID>/p<REPLY_TS>?thread_ts=<PARENT_TS>.
Use thread_ts (the parent). The p<ts> in the path is a reply id — using it misses the parent and any replies above it.
URL='https://example.slack.com/archives/CXXXXXXXXXX/p1700000000000000?thread_ts=1700000000.000000'
CH=${URL#*archives/}; CH=${CH%%/*}
TS=${URL#*thread_ts=}; TS=${TS%%&*}
slack msg thread "$CH" "$TS" -o json
not_in_channelReading messages requires channel membership; channels:history alone is not enough.
conversations.join (requires channels:join scope)./invite @slackcli; bots cannot self-join.SLACK_USER_TOKEN / --as-user).Self-join guard for public channels (conversations.join is idempotent):
TOKEN=${SLACK_API_TOKEN:-$(cut -d= -f2 ~/.config/slack-chat-api/credentials)}
curl -sS -H "Authorization: Bearer $TOKEN" -d "channel=$CH" \
https://slack.com/api/conversations.join >/dev/null
slack msg thread "$CH" "$TS"
If conversations.join returns missing_scope, add channels:join at
https://api.slack.com/apps/A0AN5RUFSNB/oauth and Reinstall to Workspace.
xoxb-) cannot unarchive channels — bot is removed on archive. Use a user token or the Slack UI.channels invite idempotency is limited to single-user invites.not_in_channel".