Skip to content

Rich REPL UI with Rebelλ︎

Figwheel will run Rebel readline to start the REPL, as the :fig alias includes com.bhauman/rebel-readline-cljs as an extra dependency.

Rebel provides syntax highlighted code, auto-completion, commands to manage the REPL and Clojure documentation help, all within its rich command line.

Clojure CLI tools - Figwheel-main - rebel readline

Typing :repl/help as a command at the Rebel prompt shows characters are syntax highlighted. The command provides a quick reference for Rebels capabilities.

Figwheel-main - repl help

Evaluate expressions by typing them at the Rebel prompt and pressing RET, e.g. (map inc [2 4 6 8])

JavaScript interop code also works from the Rebel prompt, e.g. (js/alert "Notification from the command line") will display an alert in the browser.

Practicalli Clojure provides examples of using Rebel as a rich terminal UI for the Clojure REPL

The clojure command should be used to run Rebel. The clj wrapper script calls rlwrap which conflicts with Rebel, as they are both readline tools.