A partial node implementation of my rust cli topheman/snake-pipe-rust.
npm install -g snakepipe # will install snakepipenode
Optional: Install the rust version - it will let you pipe original commands
cargo install snakepipe # will install snakepipe
This is a partial implementation, for all the commands, see the rust implementation.
# Without piping to render
snakepipe gamestate|snakepipenode validate
# Piping to render
snakepipe gamestate|snakepipenode validate|snakepipe render
This node version ships with an implementation of IPS supporting tcp and unix domain sockets, just like in the rust version,
Open two terminals. snakepipenode tcp-play
will expose a process that accepts tcp connections (on port 8050 by default). You can connect to it via netcat (the nc
command), that will pipe the tcp stream output to stdout.
Here are a few commands mixing the rust and node versions.
# main terminal
snakepipe gamestate|snakepipenode tcp-play|snakepipe render
# mirroring terminal
nc localhost 8050|snakepipe render # with netcat
snakepipenode tcp-watch|snakepipe render # or with snakepipe itself
Open two terminals. snakepipenode socket-play
will expose a unix domain socket (by default on /tmp/snakepipe.sock
). You can connect to it via netcat (the nc
command), that will pipe the socket stream to stdout.
# main terminal
snakepipe gamestate|snakepipenode socket-play|snakepipe render
# mirroring terminal
nc -U /tmp/snakepipe.sock|snakepipe render # with netcat
snakepipenode socket-watch|snakepipe render # or with snakepipe itself
npm install snakepipe
See example of usage on topheman/snake-pipe-rust.
snakepipe gamestate
#1