improve cli tool : more compatible