Send messages to Slack from command line.
date | slacker -c slack_channel -t slack_token
Slack Token can be called from a enviroment variable, called SLACK_TOKEN
.
You can set SLACK_TOKEN
in your ~/.bashrc
. Or you can use a shell script to call it with the -t option.
# ~/.bashrc
export SLACK_TOKEN="slack_token_string"
date | slacker -c slack_channel
Send message to user
date | slacker -u user_name
Send message to #real_engineering and echo binary to a user or a channel (message is signed as 'bot')
date | slacker -u user_name -b
date | slacker -c slack_channel -b
Upload file to channel:
date | slacker -c slack_channel -f image.png
pip install slacker-cli