This is a (lightly) annotated run through of launching a jupyter kernel, sending some messages, and cleaning it up.
git clone https://gist.github.com/3239c1547b53c97cc648d5abb3cbe3e0.git kernely
cd kernely
npm install
node index.js
You will likely need node > 8.x