improved handling of command line arguments with tools/cli