Starting the REPL

Marcin Kasperski edited this page Nov 1, 2015 · 9 revisions

Go to Firefox Tools menu (to make it visible, press F10 or Alt-T – depening on your platform) and select MozLabStart MozRepl. MozRepl is now listening for connections on the default port 4242. Alternatively, use separate Firefox instance as described below in chapter Starting on specific port.

See platform notes below for how to start Firefox using the REPL addon.

Open the command shell of your operating system and type:

    telnet localhost 4242

You’ll be presented with the prompt:


You’re in!

Platform-specific notes

If you’re using Microsoft’s telnet for Windows, it’s probably set to handle one-character-at-a-time instead of one-line-at-a-time. See the Troubleshooting page, or just use netcat (recommended) or putty.

If you’re on Linux or some other Unix variant, you can use rlwrap to get command history and other niceties. Use arrow-up/down to retrieve previous commands and Control+R to search among them.

    $ rlwrap telnet localhost 4242

If you’re using Emacs, see the Emacs integration page.

Starting on a specific port

To start the repl via the command line on a specific port, execute the following command depending on your platform.


/Applications/ -profile /path/to/profile/folder -repl -repl 7070
/usr/bin/firefox -profile /path/to/profile/folder -repl -repl 7070
"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" /repl /repl 4242

The profile path in the examples above must be a profile that has the mozrepl extension installed.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.