Code for part 2 Best to start reading from tmpcli as it glues together all other files. To build it just run go get && go build.