/karma

Karma bot for Slack

Primary LanguageMakefile

Slack - Karma Build Status

A simple karma bot for Slack.

Setup

Slack

CLI

Binary

$ karma --port=8080 --token=1234 --callback=http://example.com
$ export KARMA_PORT=8080
$ export KARMA_TOKEN=1234
$ export KARMA_CALLBACK=http://example.com
$ karma

Docker

Available here: https://github.com/nickschuch/karma-docker

$ cat << EOF > ~/karma.env
KARMA_PORT="8080"
KARMA_TOKEN="123456"
KARMA_STORAGE="memory"
KARMA_NAME="Karma"
KARMA_EMOJI=":slack:"
KARMA_CALLBACK="http://example.com"
EOF
$ docker run --env-file ~/karma.env -p 127.0.0.1:8080:8080 nickschuch/karma

Storage

Currently Karma ships with 2 options for storage:

  • In memory - Only keeps the data for a single run.
  • AWS DynamoDB - Key value storage backend for long term persistence.

Usage

Give karma

/karma nickschuch++
/karma nickschuch+=10

Take karma

/karma nickschuch--
/karma nickschuch-=10

Check my karma

/karma

Check karma of others

/karma nickschuch

Building

This project requires the build tool gb, please install with:

$ go get github.com/constabulary/gb/...

You can now build the project with:

$ make

# Check they exist
$ ls bin/karma-darwin-amd64

To build for Linux and Darwin run:

$ make all

# Check they exist
$ ls bin/karma-darwin-amd64
$ ls bin/karma-linux-amd64