/percona-slack-cli

Primary LanguageJavaScriptMIT LicenseMIT

percona-slack-cli

Summary

A simple node.js library for send notifications to Slack via Incoming WebHooks.

Installation

Install nodeJS from repository: check here

Then install with npm:

npm install -g percona-slack-cli

Configure the client:

export SLACK_URL="https://hooks.slack.com/services/your/custom/slackWebbHook"

Define some defaults:

export SLACK_CHANNEL="#general"
export SLACK_USER="messenger"

###Send message:

Use your defaults

slack -m "nice foobared message"

Override your defaults

slack -u newBot -c "#channel" -m "nice new message wihtout defaults"

Send a Direct Message

slack -c "@someuser" -m "Direct message from bot"

Change status style

slack -s danger -m "Houston! we have a problem!"

###TODO:

  • Customize your attachments
  • Send to multiples channels