Post messages to Slack from the command line
Switch branches/tags
Nothing to show
Clone or download
paulhammond Allow username (including "") to be set in config file
This allows you to configure slackcat to use the default username from the
Webhook configuration screen. It also allows you to set better default
usernames on a per-host or per-user basis.
Latest commit 0b27c09 May 17, 2014
Failed to load latest commit information.
LICENSE.txt Add MIT license May 9, 2014 README May 9, 2014
slackcat.go Allow username (including "") to be set in config file May 17, 2014


slackcat is a command line tool that posts messages to Slack.

$ echo "hello" | slackcat


If you have a working go installation run go get Prebuilt binaries will be provided soon.


First, create a new Slack Incoming Webhook integration.

Then create a /etc/slackcat.conf file, and add your new webhook url:


If you don't have permission to create /etc/slackcat.conf then you can create ~/.slackcat.conf instead.


slackcat will take each line from stdin and post it as a message to Slack:

tail -F logfile | slackcat

If you'd prefer to provide a message on the command line, you can:

sleep 300; slackcat "done"

By default slackcat will post each message as coming from "user@hostname". If you want a different username, use the --name flag:

echo ":coffee:" | slackcat --name "coffeebot"

Slackcat will use the channel specified when you set up the incoming webhook. You can override this in the config file by adding a "channel" option, or you can use the --channel flag:

echo "testing" | slackcat --channel #test