Skip to content
Docs/Socketo CLI
Docs/CLI & Self-Hosting

Socketo CLI

Standalone local Pusher-compatible WebSocket server and CLI reference.

Overview

The @socketo/cli package is a zero-dependency, local Pusher-compatible WebSocket and REST server designed for development and automated testing environments.

Installation & Execution

Run instantly without local installation:

bash
npx @socketo/cli start

Subcommands

CommandDescription
startLaunches the local WebSocket and REST server (default port 8787).
trigger <channel> <event> [data]Publishes an event directly to a local or remote channel.
replOpens an interactive terminal session for inspecting connections and channels.

CLI Options (start)

OptionAliasDefaultDescription
--port-p8787Port to bind the HTTP and WebSocket server.
--host-H127.0.0.1Network interface to bind.
--key-klocalAccepted application key.
--secret-slocalAccepted application HMAC secret.
--webhook-w—Target HTTP URL for outbound webhook delivery.
--webhook-events—*Comma-delimited list of subscribed webhook events.
--disable-client-events—falseDisallow client-* events from connected clients.

Local Webhook Testing Example

bash
npx @socketo/cli start -w http://localhost:3000/api/webhooks --webhook-events channel_occupied,channel_vacated,client_event