start rewriting the CLI, patch 1