Slack Cutter cuts you some slack!
Slack Cutter is an intermediary API to communicate with Slack. You can create custom Slack slash commands, incoming hooks, bots, cron jobs (soon)...
Written in ES6/2015 with transpiling to ES5 via Babel
Right now we have the following slash commands:
- Extension Number: Lookup your colleague's extension number. Eg:
/ext John: searches for John's extension number
/ext: List all available extension numbers
- Continuous Integration server: Trigger builds in your CI server. Eg:
/ci build my-product
/ci release my-product 1.2.3-alpha
/ci deploy my-product 1.2.3-alpha
- Pull Requests: List a project Pull Requests from GitHub in a particular channel to facilitate code review and prioritization. Eg:
- Any new API should be fairly easy to add. Just create a new route.
The configuration variables are set via environment variables and/or using the
.env file (environment variable has precedence over
Just copy the
.env and modify it as needed.
The GitHub credentials are only needed if you're planning to use the
Important: if you're going to use a
.env file AND are using Docker, edit it before you build the Dockerfile.
Every slash commands takes a
.json with private data. See the README in each command's directory to learn how to configure and use them. Basically, you'll have to copy the
config.json and edit them to your needs
You can install it in your own local infrastructure or in a cloud service like heroku. Alternatively, you can build a Docker image and deploy as container
- Set up a server address in your local infrastructure that will serve this application (eg:
- Clone/download this repo to your chosen server
- Configure your application according to the "Configuration" section above
Via pure NodeJS + npm
- Install NodeJS if you don't have it already
npm installin the app's root folder
Important note: make sure you don't have any firewall blocking the incoming TCP port (default is PORT 5000 as defined in the "Configuration" section above)
- Build the Docker image:
npm run container:build
Note: In Linux the
localhost, within OSX's Boot2docker, use the IP reported by the command:
Via pure node or npm
npm startto fire up the application
Run the container: 1. If you used the
npm run container:run2. Without
docker run -e PORT=5000 -e SLACK_TOKEN=123123 -e SLACK_DOMAIN=company -e SLACK_CHANNEL=channel -p 5000:5000 -d slack-cutter
Ensure the container is running (you should also be able to access the service using web browser:
You can run
npm run | grep container: to see other available container actions.