CLI mode implementation