Skip to content

Simple BOT to send Slack message from terminal

Notifications You must be signed in to change notification settings

pantonante/slackme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Slackme BOT

I often need to receive notifications from a remote server whenever a long job/process ends. That's why I build this embarrassingly simple bot, slackme!

Prerequisite

  • Golang

Install

Just run go get github.com/pantonante/slackme.

Setup

You need to create a Slack Incoming Webhooks, follow the guide here.

One you obtained your Incoming Webhook URL create the file $HOME/.slackme.yaml and put the following content

default:
  https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
direct:
  https://hooks.slack.com/services/T00000000/B00000000/YYYYYYYYYYYYYYYYYYYYYYYY

Replace the dummy URL with your, newly createt Webook URL.

Usage

Suppose you have to run the command longprocess, now run

longprocess; slackme message "Long Process finished. (Ret: $?)"

This command will send a message to the default webhook when the process finishes with its return code.

You can also specify a channel name, e.g.,

longprocess; slackme message -c direct "Long Process finished. (Ret: $?)" 

About

Simple BOT to send Slack message from terminal

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages