Lead Maintainer: @maxbeatty
This is a version of GitHub's hubot. He's pretty cool.
This version is designed to be deployed on Heroku.
Playing with Hubot
You'll need to install the necessary dependencies for hubot. All of those dependencies are provided by npm.
Hubot has a HTTP listener which listens on the port specified by the
You can specify routes to listen on in your scripts by using the
module.exports = (robot) -> robot.router.get "/hubot/version", (req, res) -> res.end robot.version
There are functions for GET, POST, PUT and DELETE, which all take a route and callback function that accepts a request and a response.
We are using the
mongo-brain.coffee script from
hubot-scripts for persistence.
Testing Hubot Locally
You can test your hubot by running the following.
You'll see some start up output about where your scripts come from and a prompt.
[Sun, 04 Dec 2011 18:41:11 GMT] INFO Loading adapter shell [Sun, 04 Dec 2011 18:41:11 GMT] INFO Loading scripts from /home/tomb/Development/hubot/scripts [Sun, 04 Dec 2011 18:41:11 GMT] INFO Loading scripts from /home/tomb/Development/hubot/src/scripts Hubot>
Then you can interact with hubot by typing
Hubot> hubot help Hubot> animate me <query> - The same thing as `image me`, except adds a few convert me <expression> to <units> - Convert expression to given units. help - Displays all of the help commands that Hubot knows about. ...
Take a look at the scripts in the
./scripts folder for examples.
Delete any scripts you think are silly. Add whatever functionality you
want hubot to have.
There will inevitably be functionality that everyone will want. Instead of adding it to hubot itself, you can submit pull requests to hubot-scripts.
To enable scripts from the hubot-scripts package, add the script name with
extension as a double quoted string to the
hubot-scripts.json file in this
Tired of waiting for your script to be merged into
hubot-scripts? Want to
maintain the repository and package yourself? Then this added functionality
maybe for you!
Hubot is now able to load scripts from third-party
npm packages! To enable
this functionality you can follow the following steps.
- Add the packages as dependencies into your
npm installto make sure those packages are installed
To enable third-party scripts that you've added you will need to add the package
name as a double quoted string to the
external-scripts.json file in this repo.
Lennie lives on Heroku and keeps itself alive (for the most part)
Restart the bot
You may want to get comfortable with
heroku logs and
if you're having issues.
npm test will run unit tests, lint code, and measure test coverage.