A hubot script to show available hubot commands
See src/help.js for full documentation.
-
Allows grouping commands by the name of the script they belong to.
To group commands, surround them with the markers
begin group script_nameandend group. All the commands behind the markers go to theOther commandsgroup.
//
// Commands:
// begin group script_name
// hubot command - command description
// ...
// end group
//
Example result:
-
Allows marking commands as
admin onlyand showing only avalible commands to users.To use this feature, surround the commands with the markers
begin adminandend admin. The commands inside the markers will be shown only to admin users.
//
// Commands:
// begin group script_name
// hubot command - command avalible for all users
// ...
// begin admin
// hubot command - command avalible only for admins
// ...
// end admin
// end group
//
For example:
Check the hubot-happy-birthder and hubot-viva-las-vegas repos for exapmle usage.
In hubot project repo, run:
npm install hubot-help --save
Then add hubot-help to your external-scripts.json:
["hubot-help"]You can set various environment variables to tune up the behavior of the help script:
HUBOT_HELP_REPLY_IN_PRIVATE(set to any value) will force calls tohubot helpto be answered in privateHUBOT_HELP_DISABLE_HTTP(set to any value) will disable the web interface for helpHUBOT_HELP_HIDDEN_COMMANDScomma-separated list of commands that will not be displayed in help
For tests:
npm test
user> hubot help
hubot> hubot help - Displays all of the help commands that this bot knows about.
hubot> hubot help <query> - Displays all help commands that match <query>.
hubot-help is available under the MIT License.