A simple Slack message tool for the CLI written in Go
Report Bug
·
Request Feature
Table of Contents
This is my first Go project! I'm sure there are 1000 others like it, but this one is mine.
The intent of this app is to have a simple, cross-platform binary that allows for messaging to a specified Slack channel. This can be used manually but the goal is something that can alert in automated workflows (like AWS servers booting up or terminating, etc.)
This is currently only using Incoming Webhooks, so there is no oath authentication, etc. I will likely add more features, such as the ability to attach files, in the future. For now, no tokens are needed by the project, just an Incoming Webhook URL for each channel you want to talk to.
First you will need access to a Slack workspace that you have permissions to build an App on.
Follow the Slack instructions on creating a Slack app with access to Incoming Webhooks, then create an Incoming Webhook for the channel(s) you'd like heka to talk to. Make note of the Webhook URLs as you will need to populate the config file with them later.
- Clone the repo
git clone https://github.com/jmurray2011/heka.git - Build the project
go build - From inside the project directory, run
./heka initto generate a config file - Edit the generated config file with the appropriate information (channel name and webhook URL from Slack)
- running
./heka initwill output the location of the.heka.tomlconfig file for your OS (Windows or Linux)
- running
./heka init
./heka says -m "your message here" -c "your channel here"
./heka says -m "your message here" -c "your channel here" --config /path/to/custom/config/.file.toml
echo "Hello, World!" | ./heka says -c example
- [] Add ability to add/remove channels from the CLI instead of manually editing the config
- [] Add message templates to allow for custom message formats instead of the default
- [] Further integrate with Slack API for more functionality
- [] List channels and optionally import them to config
- [] Generate Incoming Webhook URLs on-the-fly
- [] Add ability to attach files to messages
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Josh Murray - [email protected]
Project Link: https://github.com/jmurray2011/heka