cli: changed piping commands to use a nicer way of reading commands, and changed the command to use '-' instead of 'read' as the argument to the client, as suggested by @kaniini