Websocket CLI tool to connect to websocket servers. https://github.com/akshaykhairmode/wscli
914
A lightweight and powerful Go command-line tool for interacting with WebSocket servers. Designed for testing, debugging, and scripting, wscli provides functionality similar to wscat but with additional features. This tool is actively developed.
Dockerdocker run -it akshaykhairmode/wscli:latest -c "ws://example.com/ws"
go installgo install github.com/akshaykhairmode/wscli@latest
If you donβt have Go installed, download the latest binaries from the Releases Pageβ .
To quickly connect to a WebSocket server:
wscli -c ws://localhost:8080/ws
|. (Note: Interactive terminal features are disabled when using this mode.)wscli in the background using nohup:
nohup wscli -c ws://localhost/ws -w 1s > nohup.out 2>&1 &
wscli -c ws://localhost/ws >> output.txt & 2>&1
-x to execute commands automatically after connection.--jspp flag.Ctrl+W (delete word) and Ctrl+R (reverse search). See full listβ .| Flag | Shorthand | Description |
|---|---|---|
--auth | HTTP Basic Authentication credentials (e.g., username:password). | |
--binary | -b | Send hex encoded data to server |
--ca | Path to the CA certificate file (optional). | |
--cert | Path to the client certificate file (optional). | |
--connect | -c | WebSocket connection URL. |
--execute | -x | Execute a command after connecting (use multiple times for multiple commands). |
--gzipr | Enable gzip decoding if server messages are gzip-encoded. (Note: Server must send messages as binary.) | |
--header | -H | Custom headers (key:value, can be used multiple times). |
--help | -h | Display help information. |
--jspp | Enable JSON pretty printing for responses. | |
--key | Path to the certificate key file (optional). | |
--no-check | -n | Disable TLS certificate verification. |
--no-color | Disable colored output. | |
--origin | -o | Specify origin for the WebSocket connection (optional). |
--proxy | Use a proxy URL. | |
--response | -r | Display HTTP response headers from the server. |
--show-ping-pong | -P | Show ping/pong messages. |
--slash | Enable slash commands (Experimental). | |
--sub-protocol | -s | Specify a sub-protocol for the WebSocket connection (optional, can be used multiple times). |
--verbose | -v | Enable debug logging. |
--version | -V | Display version information. |
--wait | -w | Wait time after command execution (1s, 1m, 1h). |
Content type
Image
Digest
sha256:676d31bc4β¦
Size
7.6 MB
Last updated
2 months ago
docker pull akshaykhairmode/wscli