I recommend using rlwrap for shell-like history and better user experience.
Usage examples:
./tinycqlsh 0 9042 <<< "INSERT INTO t (id, v) VALUES (1, 'hello');"
./tinycqlsh 127.0.0.1 9042 < file\_with\_cql\_queries.txt
rlwrap ./tinycqlsh localhost 9042