refactor cli to have a command whitelist