Setup Hubot with Slack

Hubot is an extensible chat bot written in CoffeeScript.



$ npm install -g yo generator-hubot

$ mkdir codebaku-hubot
$ cd codebaku-hubot
$ yo hubot

a list of adapters

You need to create a Hubot integration on your Slack to request an API token.

Local Development

Writing your own script

./bin/hubot --name hubot

# or

HUBOT_SLACK_TOKEN=YOUR_SLACK_TOKEN ./bin/hubot --adapter slack

I fork a script named hubot-reload-scripts to help you reload yours scripts when developing them.


Debugging Hubot Scripts using Node Inspector

$ npm install -g node-inspector coffee-script

$ node-inspector --no-preload --web-port 8123

# generate source map
$ coffee -m scripts/*.coffee
$ coffee --nodejs --debug node_modules/.bin/hubot --name hubot
$ coffee --nodejs --debug node_modules/.bin/hubot --adapter slack

$ boot2docker ip
$ open