cleanup how the cli is invoked a bit
Merge pull request #1032 from isao/cli2

cleanup how the cli is invoked a bit