back to notes

Connect to figwheel REPL


How to connect a REPL client to the same REPL started by Figwheel, in order to access the same environnment than the one powering the browser.


Given figwheel is started in a terminal. Spitting out something like:

Figwheel: Starting nREPL server on port: 7888

Connect from a terminal

Then connect to the server from another terminal:

lein repl :connect

and access to the clojurescript REPL, first

(use 'figwheel-sidecar.repl-api)



You are now ready to drive your app displayed in the browser. Let's try to print to the browser console

cljs.user=> (js/console.log "hello from the repl")


Connect from Vim

Fireplace plugin must be installed. Open vim, it should automatically :Connect to the nREPL server.

Then access to the clojurescript REPL with the command:

:Piggieback (figwheel-sidecar.repl-api/repl-env)


Works the same as before, try cqc to eval some clojurescript in the same context as the browser.


last updated july 2018