improve cli version

The cli now has multiple options and has
an input and output parameter. Unix-style piping is still available.
It also can display help now.