- Setup a bot auth to get a token https://api.slack.com/web
npm install -g slack-clihttps://github.com/candrholdings/slack-cli- fix line endings in
cmd.jscandrholdings/slack-cli#4 - create a shorter command (so you can
slack channel "my message"instead ofslackcli -t xdf-080808798794238729-29384723948-932847349 -h channel -m "my message":
~/slack.sh:
#!/bin/bash
slackcli -h $1 -m "$2"
~/.bash_profile:
export SLACK_TOKEN=xoxp-329000000498-2300000923-000000000
alias slack='~/./slack.sh'
- load them changes:
source ~/.bash_profile - I also modified
cmd.jsto add bot name and emoji support, I should do a pull request
