Command Line Interface CLI in V6

Port and re-enable CLI functionalities to V6