Home

Awesome

hubot-shortcut

A macro system for hubot supporting macro arguments, multi-command macros, and recursive macro expansion. hubot-shortcut is fully configurable via chat.

Demo

Demo

Installation

In hubot project repo, run:

npm install hubot-shortcut --save

Then add hubot-shortcut to your external-scripts.json:

[
  "hubot-shortcut"
]

Unless you want to configure every macro via environment variable, you also need to install hubot-conf.

Usage

hubot-shortcut macros are usually configured using hubot-conf. Macros can also be configured by setting environment variables, but that is not recommended.

hubot-shortcut expands any macros set in the shortcut.* namespace in hubot-conf. It also expands macros set as HUBOT_SHORTCUT_* environment variables.

Typical usage looks like this:

> {botname} conf set shortcut.test "{botname} echo hello!"
botname: shortcut.test = `"{botname} echo hello!"`
> !test
hello!

Tips

License

Copyright (c) Anish Athalye. Released under the MIT License. See LICENSE.md for details.