slack

module
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2021 License: MIT

README

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>

Directories

Path Synopsis
cmd
internal
api
app

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL