Pipe STDIN To Slack From The Command Line
npm install -g slackcat
Output Channel ( Defaults to general )
-f general
Bot Name ( Defaults to Bot )
-n Bot
Bot Icon ( Defaults to computer )
-i :computer:
REQUIRED: Slack API Token ( see: https://my.slack.com/services/new/bot )
SLACKCAT_API_TOKEN = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
OPTIONAL: "Bot Channel"
SLACKCAT_CHANNEL = general
OPTIONAL: "Bot Name"
SLACKCAT_USERNAME = Bot
OPTIONAL: "Bot Icon"
SLACKCAT_ICON = :computer:
From The Command Line:
Say Hello Slack World! in the general channel.
echo "Hello Slack World!" | slackcat
Say Welcome To The Channel! in the welcome channel when you run this command
echo "Welcome To The Channel!" | slackcat -f welcome
Use all the command line options to ask Who Wants Cake? in the party channel with the 🍰 icon and use the name Chef.
echo "Who Wants Cake?" | slackcat -f party -i :cake: -n Chef
Facts:
- This module is heavily inspired by and loosely based off of the python module slackcat.
- A 10 second delay occurs before slackcat will exit after the STDIO is closed. This gives the bot time to send the data to slack before exiting.
- Feature requests will not be taken but bug related issues will be addressed.
- No cats were harmed in the making of this module.
- Less than 1 cup of coffee and 2 hours of time was used in making this module
- You can run this module with nodejs to output errors to slack. example: node server.js | slackcat
MIT