Read this entry CLI commandline-interface / websocket interface etc / Node.JS client
It talks about CLI use for Jami