Advertisement
Guest User

Untitled

a guest
May 21st, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. #!/usr/bin/env node
  2.  
  3. const cli = require('cac')('txtl')
  4.  
  5. const { log } = console
  6.  
  7. // Create 'default' chat command
  8. cli.command('', 'Starts an interactive chat session in a thread.')
  9. .action((opts) => {
  10. log('do something')
  11. })
  12. .option('--thread [thread]', 'Thread ID. Omit to use the \'default\' thread.', {
  13. default: 'default',
  14. type: [String]
  15. })
  16.  
  17. // Display help message when `-h` or `--help` appears
  18. cli.help()
  19. // Display version number when `-v` or `--version` appears
  20. cli.version('1.0.0')
  21. // Parse stdin
  22. cli.parse()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement