@versatly/slack-cli
v1.0.0
Published
Slack CLI for workspace operations using @slack/web-api
Maintainers
Readme
@versatly/slack-cli
Slack CLI for workspace operations, built on the official @slack/web-api SDK.
Install
npm install -g @versatly/slack-cliAuthentication
Set one of the following environment variables:
export SLACK_BOT_TOKEN="xoxb-..."
# or
export SLACK_USER_TOKEN="xoxp-..."The CLI will prefer SLACK_USER_TOKEN for user-scoped commands (status, search).
Usage
slack channels list
slack channels info general
slack channels info C12345678
slack send general "Hello team!"
slack send --user U12345678 "Hello from the CLI!"
slack users list
slack users info [email protected]
slack status set "In focus" --emoji :headphones:
slack search "from:@jane has:link"Required Slack Scopes
Suggested scopes for a Slack app token:
conversations:readfor channel listing/infochat:writefor sending messagesim:writefor opening DMsusers:readandusers:read.emailfor user lookupusers.profile:writefor status updatessearch:read(user token only) for search
Notes
- Channel arguments accept IDs (
C...,G...) or names (general,#general). - User arguments accept IDs (
U...) or email/name values when available.
