Slackify - Commandline Slack tool

Send files or text data to Slack from your shell using the commandline or pipe in stdin.

Go Report Card License

Setup - Creating a Slack Bot

Before using Slackify you need a bot user token.

To obtain a bot user token follows these steps:

  1. Open the url: and hit the button Create New App
  2. Once the app is created, hit Add features and functionalityBotsAdd a Bot User
  3. Then hit the button PermissionsInstall App To Workspace

Moving to the OAuth & Permissions page and you will find your Bot User OAuth Access Token

  • it always starts with the prefix xoxb-

How to use Slackify

Once you have the Bot User Access Token you can pass it to Slackify in two ways:

  • pass it to Slackify everytime as parameter

    • option: –token=“xoxb-…………….”
  • define an environment variable SLACKIFY_APP_TOKEN

    • windows (powershell): $env:SLACKIFY_APP_TOKEN=“xoxb-…………..”
    • linux/osx : export SLACKIFY_APP_TOKEN=xoxb-…………..

I suggest you to use this last way (defining an env variable).

Upload files to Slack from your CLI
slackify -channels devops -file ./elastic-metrics.png

Adding a comment…

slackify -channels devops \
   -file ./elastic-metrics.png \
   -comment "Hi crew, this is the actual report about app indices"
Pipe in stdin

A Linux example:

ps -a | slackify -channels devops

A Windows example:

tasklist | slackify -channels devops