post to Slack on the command line
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.


Notify slack from the command line. It receives standard input and notifies Slack all at once every second (can be changed with the -interval option).


go get

Or you download from Releases.

If you want to develop, please use the make.

make bundle


./bin/notify_slack posts to Slack. You specify the setting in command line option or toml setting file. If both settings are specified, command line option will always take precedence.

./bin/output | ./bin/notify_slack

./bin/output is used for testing. While buffering, to post to slack.


You post the file as a snippet. token and channel is required to use the Slack Web API.

CLI options

-c string
      config file name
-channel string
      specify channel
-icon-emoji string
      specify icon emoji
-interval duration
      interval (default 1s)
-slack-url string
      slack url
-token string
-username string
      specify username
      Print version information and quit

toml configuration file

By default check the following files.

  1. a file specified with -c
  2. $HOME/etc/notify_slack.toml
  3. /etc/notify_slack.toml

The contents of the toml file are as follows.

url = "**"
token = "xxxxx"
channel = "#general"
username = "tester"
icon_emoji = ":rocket:"
interval = "1s"


  • url is a required parameter.
    • You can specify channel, username, icon_emoji and interval.
  • token and channel is necessary if you want to post to snippet.
    • username and icon_emoji are ignored in this case.