Extract run() method to call kdm_cli().