bkeepers / hubot-commands

experiment with building a command interface into Hubot

Home Page:https://github.com/hubotio/evolution/pull/2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hubot Commands

This is a prototype for the Hubot commands proposal.

module.exports = robot => {
  const cli = require('hubot-commands')(robot)

  cli.command('cowsay <words...>', (res, words) => {
    res.send(require('cowsay').say(words.join(' ')))
  })
  .description('make the cow say words')
  .alias('c')
}

TODO:

  • explicit args
    • required: deploy <branch>
    • optional: deploy <branch> [environment]
    • Variadic: deploy <branch> [hosts...]
    • coercion & regex for advanced syntax
    • default values
  • subcommands: deploy list
  • alias
  • automated help
  • listener metadata

About

experiment with building a command interface into Hubot

https://github.com/hubotio/evolution/pull/2


Languages

Language:JavaScript 100.0%