Extensible Interactive CLI Plugin for Wechaty ChatOps, Powered by Vorpal.
Image: rainbow sword
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.
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
- Creating Node.js Command Line Utilities to Improve Your Workflow
- vantge - Distributed, realtime CLI for live Node apps.
- vorpal - Node's framework for interactive CLIs
- vorpal-regorged - Conquer the command-line. ⚔️: This is a Fork aiming at reforging vorpal into typescript, and bringing a 2.0
- bandersnatch - Super lightweight and friendly CLI scaffolding for Node.js programs.
Release 1.0
- v0.7 (Sep 19, 2021): ES MOdule support
- Support Input, Output, and Error (powered by Observable)
this.stdout.next(...)
this.stderr.next(...)
this.stdin.subscribe(msg => {...})
.
- Support send any supported
SayableMessage
type of message to the userstring
FileBox
Contact
UrlLink
- etc...
- Support get the
message
instance which invoked this commandthis.message
- Support
ask()
to ask user question and get the answer back! - Support WechatyVorpalConfig
silent
to do not show help message for unknown commands - Rename WechatyVorpalConfig
at
tomention
for only react for message in a room that mention the bot itself.
Inherit the TypeScript source code from the Vorpal Reforged (MIT License) so that we can refactor it to fit the Chatbot environment better.
Init the first version of Vorpal Wechaty Plugin for managing ChatOps Commands
Huan LI (李卓桓), Tencent TVP of Chatbot, <zixia@zixia.net>
- Code & Docs © 2020 Huan LI (李卓桓) <zixia@zixia.net>
- Code released under the Apache-2.0 License
- Docs released under Creative Commons