{"id":48184,"library":"interactive-websocket-cli","title":"Interactive WebSocket CLI","description":"Interactive WebSocket CLI (iwscli) v1.5.0 is an interactive command-line tool for debugging and testing WebSocket connections. It provides an interactive client (`wscli connect`) and server (`wscli listen`), as well as a proxy tool (`wstee`) for monitoring WebSocket traffic. Key differentiators include interactive keypress-driven commands for sending messages (client) and managing multiple clients (server), pipe mode for stdin/stdout integration, support for file-based input/output, and configurable WebSocket options via JSON. Released March 2023, with a steady cadence of minor updates. Commonly used in development workflows for manually testing WebSocket endpoints or proxying traffic.","status":"active","version":"1.5.0","language":"javascript","source_language":"en","source_url":"https://github.com/danhab99/iwscli","tags":["javascript","websockets","ws","cli","interactive","debug","util","suite"],"install":[{"cmd":"npm install interactive-websocket-cli","lang":"bash","label":"npm"},{"cmd":"yarn add interactive-websocket-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add interactive-websocket-cli","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core WebSocket library for client and server functionality","package":"ws","optional":false},{"reason":"CLI argument parsing","package":"commander","optional":false},{"reason":"Terminal string coloring for pretty output","package":"chalk","optional":false}],"imports":[{"note":"This package is a CLI tool, not a library. Install globally with npm i -g interactive-websocket-cli, then use via wscli or wstee commands.","wrong":"require('interactive-websocket-cli')","symbol":"N/A (CLI tool)","correct":"npx interactive-websocket-cli"},{"note":"Address must be a WebSocket URL (ws:// or wss://) or a shorthand like 'echo.websocket.org' (auto-prefixed with ws://).","wrong":"wscli connect http://example.com","symbol":"wscli","correct":"wscli connect ws://example.com"},{"note":"wstee is a separate binary for proxying, usage: wstee --help for options.","wrong":"wstee --help incorrectly","symbol":"wstee","correct":"wstee"}],"quickstart":{"code":"# Install globally\nnpm i -g interactive-websocket-cli\n\n# Connect to a public echo server\nwscli connect wss://echo.websocket.org\n# Once connected, press 'h' for help, 's' to send a message, type message and press Enter\n\n# Start a local WebSocket server on port 8080\nwscli listen 8080\n# In another terminal, connect: wscli connect ws://localhost:8080\n# On server: press 'b' to broadcast a message to all clients\n\n# Use wstee to proxy a connection and monitor traffic\nwstee --proxy-url wss://echo.websocket.org --listen-port 3000\n# Then connect to ws://localhost:3000; all traffic is logged and forwarded","lang":"javascript","description":"Shows how to install and use wscli to connect to a WebSocket server, start a server, and use wstee for proxying."},"warnings":[{"fix":"Always specify the full URL (ws:// or wss://) when connecting to avoid automatic prefix.","message":"The connect command automatically prefixes ws:// if no scheme is given, which may lead to unintended unsecured connections.","severity":"gotcha","affected_versions":"*"},{"fix":"Add -p flag when using --in: wscli connect -p --in messages.txt ws://example.com","message":"The -p (pipe) option must be enabled when using --in file inputs, otherwise files are ignored.","severity":"gotcha","affected_versions":"*"},{"fix":"Upgrade to v1.5.0+ and use CLI flags (--proxy-url, --listen-port) instead of config files.","message":"wstee proxy command no longer supports config file options in newer releases; use CLI flags instead.","severity":"deprecated","affected_versions":"<1.5.0"},{"fix":"Press 's', enter client numbers (e.g., 1,2), then press 't' and type message.","message":"When running as server, the 't' (transmit) command requires selecting clients first via 's' (select prompt).","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"search_vec":"'2023':80 'base':70 'cadenc':84 'cli':3,6,104 'client':26,55,59 'command':13,51 'command-lin':12 'common':88 'configur':73 'connect':21,28 'debug':17,106 'develop':91 'differenti':45 'driven':50 'endpoint':97 'file':69 'file-bas':68 'includ':46 'input/output':71 'integr':65 'interact':1,4,11,25,47,105 'iwsc':7 'javascript':101 'json':77 'key':44 'keypress':49 'keypress-driven':48 'line':14 'listen':32 'manag':57 'manual':94 'march':79 'messag':54 'minor':86 'mode':62 'monitor':41 'multipl':58 'option':75 'pipe':61 'provid':23 'proxi':37,99 'releas':78 'send':53 'server':30,60 'stdin/stdout':64 'steadi':83 'suit':108 'support':66 'test':19,95 'tool':15,38 'traffic':43,100 'updat':87 'use':89 'util':107 'v1.5.0':8 'via':76 'websocket':2,5,20,42,74,96,102 'well':34 'workflow':92 'ws':103 'wscli':27,31 'wstee':39","created_at":"2026-06-07T16:55:19.871077+00:00","updated_at":"2026-06-07T16:55:19.871077+00:00","problems":[{"fix":"Run npm i -g interactive-websocket-cli to install all dependencies globally.","cause":"Missing dependency or global install failure","error":"Error: Cannot find module 'commander'"},{"fix":"Install globally: npm i -g interactive-websocket-cli. Ensure global node_modules bin is in PATH.","cause":"Package not installed globally or not in PATH","error":"wscli: command not found"},{"fix":"Use wscli connect <url> or wscli listen <port>.","cause":"Using wscli without specifying a command (connect/listen)","error":"TypeError: Cannot read properties of undefined (reading 'on')"},{"fix":"Use ws://localhost:9000 without path.","cause":"URL path is not supported; connect command expects only host:port","error":"Error: Invalid URL: ws://localhost:9000/extra"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/danhab99/iwscli#readme","github":"https://github.com/danhab99/iwscli","docs":null,"changelog":null,"pypi":null,"npm":"interactive-websocket-cli","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops","testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}