Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A chat plugin for ws-testbed. Best used with ws-testbed-cli.
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

ws-testbed-chat is an example plugin for ws-testbed that provides a simple console based interface for a chatting application. It uses blessed to create the console UI.

User Interface

When the plugin is loaded, the UI takes over. The interface has two widgets: The larger one at the top is the output, showing events and received data. At the bottom is a smaller box with one line for input. Any text entered (and confirmed with ENTER) is sent to all currently connected connections.

ESC switches focus between the two widgets. The output allows scrolling back; The output auto-scrolls only if the last entry is currently selected.

Ctrl+Q terminates the process.


This is a testing plugin that can be used in any ws-testbed based program (running on the console). A typical application is the use with ws-testbed-cli.

Running with ws-testbed-cli

The following example connects to the echo service at (ws://

ws-testbed connect ws:// --plugins=file:src/index.js

(Run from within the root directory of ws-testbed-chat)

Known Issues

The blessed library doesn't seem to allow a graceful shutdown, so the interface can not be properly removed by unloading the plugin. In this respect, it is a bad example for proper plugins that should allow being unloaded.


The project is available under the terms of the New BSD License (see LICENSE file).

Something went wrong with that request. Please try again.