https://github.com/bkeepers/hubot-commands
experiment with building a command interface into Hubot
https://github.com/bkeepers/hubot-commands
Last synced: about 2 months ago
JSON representation
experiment with building a command interface into Hubot
- Host: GitHub
- URL: https://github.com/bkeepers/hubot-commands
- Owner: bkeepers
- Created: 2017-05-25T15:13:24.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-31T13:08:56.000Z (about 9 years ago)
- Last Synced: 2025-03-11T18:55:00.980Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://github.com/hubotio/evolution/pull/2
- Size: 18.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hubot Commands
This is a prototype for the Hubot [commands proposal](https://github.com/hubotio/evolution/pull/2).
```js
module.exports = robot => {
const cli = require('hubot-commands')(robot)
cli.command('cowsay ', (res, words) => {
res.send(require('cowsay').say(words.join(' ')))
})
.description('make the cow say words')
.alias('c')
}
```
TODO:
- [ ] explicit args
- [x] required: `deploy `
- [x] optional: `deploy [environment]`
- [ ] Variadic: `deploy [hosts...]`
- [ ] coercion & regex for advanced syntax
- [ ] default values
- [ ] subcommands: `deploy list`
- [x] alias
- [x] automated help
- [ ] listener metadata