Home

Awesome

wechaty-vorpal

Wechaty Vorpal NPM NPM Version

Extensible Interactive CLI Plugin for Wechaty ChatOps, Powered by Vorpal.

Wechaty Vorpal

Image: rainbow sword

Powered by Wechaty TypeScript

Usage

import { Wechaty }        from 'wechaty'
import { WechatyVorpal }  from 'wechaty-vorpal'
import hackerNews         from 'vorpal-hacker-news'

const wechaty = new Wechaty()

wechaty.use(
  WechatyVorpal({
    use: hackerNews,
  }),
)

wechaty.start()

See: wechaty-vorpal-contrib for more Wechaty Vorpal Extension CLI for Chatbots.

Demo

Wechaty Vorpal Hacker News

help

Commands:

    help [command...]       Provides help for a given command.
    exit                    Exits application.
    hacker-news [options]   Lists the top stories on hacker news.

help hacker-news

Usage: hacker-news [options]

  Lists the top stories on hacker news.

  Options:

    --help              output usage information
    -l, --length [amt]  Limits the list to a given length.

hacker-news --length 3

Pulling top 3 stories on Hacker News:

  1. Discovering Dennis Ritchies Lost Dissertation (org)
     93 points by beefhash 3 hours ago | 23 comments

  2. Updating the Git protocol for SHA-256 (net)
     81 points by chmaynard 14 hours ago | 48 comments

  3. Mac OS X Leopard and Xcode on iPad Pro (com)
     134 points by tosh 10 hours ago | 28 comments

Resources

  1. Creating Node.js Command Line Utilities to Improve Your Workflow
  2. vantge - Distributed, realtime CLI for live Node apps.
  3. vorpal - Node's framework for interactive CLIs
  4. vorpal-regorged - Conquer the command-line. ⚔️: This is a Fork aiming at reforging vorpal into typescript, and bringing a 2.0
  5. bandersnatch - Super lightweight and friendly CLI scaffolding for Node.js programs.

Contributors

contributor contributor contributor contributor contributor contributor contributor contributor

History

main v1.0 (Oct 23, 2021)

Release 1.0

  1. v0.7 (Sep 19, 2021): ES MOdule support

v0.6 (July 13, 2020)

  1. Support Input, Output, and Error (powered by Observable)
    1. this.stdout.next(...)
    2. this.stderr.next(...)
    3. this.stdin.subscribe(msg => {...}).
  2. Support send any supported SayableMessage type of message to the user
    1. string
    2. FileBox
    3. Contact
    4. UrlLink
    5. etc...
  3. Support get the message instance which invoked this command
    1. this.message
  4. Support ask() to ask user question and get the answer back!
  5. Support WechatyVorpalConfig silent to do not show help message for unknown commands
  6. Rename WechatyVorpalConfig at to mention for only react for message in a room that mention the bot itself.

v0.3 (July 7, 2020)

Inherit the TypeScript source code from the Vorpal Reforged (MIT License) so that we can refactor it to fit the Chatbot environment better.

v0.2 (Jun 19, 2020)

Init the first version of Vorpal Wechaty Plugin for managing ChatOps Commands

Author

Huan LI (李卓桓), Tencent TVP of Chatbot, <zixia@zixia.net>

Profile of Huan LI (李卓桓) on StackOverflow

Copyright & License