slack
-- CLI Slack Viewer
slack
is a command line tool for reading messages in Slack.
Install
go get -u github.com/moutend/slack/cmd/slack
Setup
Before starting, you need prepare API tokens for this tool.
- Visit api.slack.com/apps.
- Create new app.
- Add the following OAuth scopes:
- Bot scope
- User scope
channels:history
channels:read
groups:history
groups:read
im:history
im:read
mpim:history
mpim:read
- After setting the scopes, install the app.
- Your bot and user API tokens are issued.
- Set the environement variables like this:
export SLACK_BOT_API_TOKEN="xxxxxxxx"
export SLACK_USER_API_TOKEN="zzzzzzzz"
That's it!
Usage
Print about yourself
slack whoami
Print active users
slack users
Print active channels
slack channels
Print public conversations
slack messages general
Print private conversations
slack messages @someone
LICENSE
MIT
Author
Yoshiyuki Koyanagi <moutend@gmail.com>