start rewriting the CLI, patch 2