Skip to content
/ slack Public

`slack` is a command line tool for reading messages in Slack.

License

Notifications You must be signed in to change notification settings

moutend/slack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

  1. Visit api.slack.com/apps.
  2. Create new app.
  3. Add the following OAuth scopes:
  • Bot scope
    • users:read
  • User scope
    • channels:history
    • channels:read
    • groups:history
    • groups:read
    • im:history
    • im:read
    • mpim:history
    • mpim:read
  1. After setting the scopes, install the app.
  2. Your bot and user API tokens are issued.
  3. 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>

About

`slack` is a command line tool for reading messages in Slack.

Resources

License

Stars

Watchers

Forks

Packages