UNPKG

saihu

Version:

Client side chatbot framework that can be run in the command line

89 lines (57 loc) 1.72 kB
# Saihubot-cli :robot: Sample :speech_balloon: message/chat bots ops in the :globe_with_meridians: **Command Line**, no server required. The Saihubot-cli project is derived from https://github.com/gasolin/saihubot , and can share most of skills between them. # Try it Run `npx saihu tr ecosystem` Will trigger the command to search the `ecosystem` from Google Translate (what shortcut `tr` did) There are plenty of build-in skills, try `npx saihu help` to see them all. ## Install Globally install via `npm install -g saihu` Then you can use `saihu` command to perform some skills ```sh $ saihu today - weather - history $ saihu google [something] $ saihu g [something] // shortcut $ saihu tr [word] // shortcut of googletranslate ``` # Customize You can build your own bot by clone the project from https://github.com/gasolin/saihubot/tree/gh-pages/src/packages/cli and modify to customize your command line bot. More skills and packages can be found in https://github.com/gasolin/saihubot/tree/gh-pages/src/packages ## Install ```sh $ git clone https://github.com/gasolin/saihu $ npm install ``` ## CLI ``` $ saihu --help Usage $ sai Options --name Your name Examples $ saihubot-cli --name=Jane Hello, Jane ``` ## Debugging ``` npm start ping -- --debug ``` ``` npx babel-node --presets @babel/preset-env cli.js --debug ping ``` ## Install globally ```sh $ git clone https://github.com/gasolin/saihubot-cli $ npm install && npm run build && npm install -g $ cd ~ // cli bot can run from anywhere $ saihu ping PONG $ saihu github saihubot ``` ## Reference > This readme is automatically generated by [create-ink-app](https://github.com/vadimdemedes/create-ink-app)