Javascript Command line interface emulator