Skip to content

Latest commit

 

History

History
54 lines (40 loc) · 972 Bytes

README.md

File metadata and controls

54 lines (40 loc) · 972 Bytes

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