Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env node
- const cli = require('cac')('txtl')
- const { log } = console
- // Create 'default' chat command
- cli.command('', 'Starts an interactive chat session in a thread.')
- .action((opts) => {
- log('do something')
- })
- .option('--thread [thread]', 'Thread ID. Omit to use the \'default\' thread.', {
- default: 'default',
- type: [String]
- })
- // Display help message when `-h` or `--help` appears
- cli.help()
- // Display version number when `-v` or `--version` appears
- cli.version('1.0.0')
- // Parse stdin
- cli.parse()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement