A simple command line websocket utility for piping messages to and from a browser.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 7982dc5 Feb 23, 2016
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore added git ignore Feb 1, 2016
LICENSE Initial commit Feb 1, 2016
Makefile added warnings and optimization flag to compilation Feb 4, 2016
README.md Update README.md Feb 23, 2016
build.sh added --install option Feb 4, 2016
pipe.c Added initial message option Feb 23, 2016
test.html added slightly more flushed out demonstration of the test.html Feb 4, 2016



A simple command line websocket utility for piping messages to and from a browser


while true; do date; sleep 1; done | webpipe -f test.html


webpipe -i '{"type":"subscribe","product_id":"BTC-USD"}' wss://ws-feed.exchange.coinbase.com|sed -n 's/.*price":"\([0-9\.]*\)".*/\1/p'


git clone https://github.com/emgram769/webpipe && cd webpipe
./build.sh --install

Or you can install the latest version of libwebsockets (source here) and run make instead of ./build.sh.

Try it out

./webpipe -f test.html

Navigate to localhost:8000 and open your browser's console. Type what ever you'd like into your terminal.

Use it as a simple chat

In one shell:


and in another:

webpipe localhost:8000



webpipe somesite.com

for example

webpipe -i '{"type":"subscribe","product_id":"BTC-USD"}' wss://ws-feed.exchange.coinbase.com


webpipe -p 5000 -f file.html


  • -p [port] to specify a port number to serve on.
  • -f [file] to host an HTML file (hardcoded mime-type).
  • -i [message] to send a message once the server is connected. This is useful for subscription based services.
  • -s to attempt to connect with SSL.
  • -D [delimiter] to specify a character other than \n as a delimiter.
  • -d to see debug messages in stderr.
  • -U [max users] to specify the maximum number of connections.
  • -B [max buffer size] to specify the maximum size of any sent message.