npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@cs-chatbots/webchat-cli

v2.12.0

Published

CLI for Webchat

Downloads

3

Readme

webchat-cli

CLI tool for webchat. Can be used for the management of valve, application and channels.

Install webchat CLI

$ sudo npm i -g webchat-cli

General Commands

Init

Sets controlled webchat api url

$ webchat init

Login

A login is needed for the valve related write operations and all channel/application operations. The command asks for a username and a password and after a successful authorization stores an access token received from the API locally (OAuth2). The default validity of the token is one hour. There is a different user for valve (my_username) and for channels/applications (crud).

$ webchat login

History

The CLI stores the history of write operations. This history may be displayed using:

$ webchat history

The commands are stored in the history in a normlized form (e. g. even if we use an interactive version of the command the command stored in the history is the non-interactive one with the same effect).

Valve operations

Get current valve config

$ webchat valve-ls

Set Valve Config

Set Business Hours Probability

$ webchat valve-set businessHours 0.2

Override Current Value

$ webchat valve-set valve.overrideCurrent " -1"

Delete Valve Config

Delete Business Hours probability

$ webchat valve-delete valve.businessHours

Channel Operations

Here are just some examples, see webchat help for full reference:

Create Channel

$ webchat channel-add CHANNEL_NAME

Adds a channel. The CLI will ask for the primary application id, whitelisted origins and applications linked to the channel.

$ webchat channel-add -a !ge_bot_error CHANNEL

Adds the channel CHANNEL and links all applications but ge_bot_error to this channel.

Modify Channel

$ webchat channel-mod -w +http://localhost:3000 CHANNEL

Adds the whitelisted origin http://localhost:3000 to the channel CHANNEL.

Attach To Channel Own Errorbot

$ webchat channel-mod -r ge_bot_error-onb CHANNEL

Adds new errorbot application to the channel CHANNEL.

Delete Channel

$ webchat channel-rm CHANNEL

Application Operations

Create Application

$ webchat app-add -w http://localhost:8030/APP -c CHANNEL_1,CHANNEL_2 APP

Creates the application APP with the webhook http://localhost:8030/APP and links it to the channels CHANNEL_1 and CHANNEL_2.

Modify Application

Here are just some examples, see webchat help for full reference:

$ webchat app-mod -c _CHANNEL_1,CHANNEL_2 APP

Removes the application APP from the channels CHANNEL_1 and CHANNEL_2.

Delete Application

$ webchat app-rm APP

Deletes the application APP.

Setting up for development (locally)

$ git clone
$ cd webchat-cli
$ npm install
$ node ./bin/webchat.js