Connect via Terminal

You can use REPL via any ANSI/VT100 terminal programs.

# for MacOS
$ screen /dev/tty.usbmodem? 115200
# or for Linux
$ sudo screen /dev/ttyACM? 115200
# To quit the screen session, press ctrl+a, k, y.

For Windows, PuTTY can be used as a terminal.

Special Keys

  • <ctrl>+C To break the execution of your code.

  • <up> and <down> Navigates in the input history.

REPL Commands

  • .echo [on|off] -- Echo on/off

  • .reset -- Reset JavaScript runtime context.

  • .mem -- Print heap memory usage information (total available, used and peak).

  • .gc -- Enforce garbage collection.

  • .flash [options] -- Read or write data to the non-versatile flash memory.

    • option -w -- Write user code to flash via YMODEM.

    • option -e -- Erase the user code in flash.

    • option -t -- Get total size of flash for user code.

    • option -s -- Get size of user code.

    • option -r -- Print user code in textual format.

  • .load -- Load and run Javascript program stored in flash memory.

  • .hi -- Print welcome message.

  • .help -- Print all available commands.