add cnx command, simplify other commands