neorepl

neorepl

A terminal REPL for Clojure, and friends

neorepl is what you get when you type neorepl in a Clojure project: a line editor that knows Clojure, the core of CIDER’s tooling in a terminal, from the inspector to the test runner, and a command line that scripts and coding agents use as easily as people do. It speaks nREPL, so it works with the servers your editor already talks to, and starts one with cider-nrepl when there isn’t one around.

Install it with bbin, on babashka 1.13.227 or newer:

bbin install io.github.nrepl/neorepl

Latest release: 0.5.1, and what's changed.

~/demo

The recording plays with JavaScript on. The cast file plays in asciinema too.

Code gets highlighted as you type it, along with the delimiter that pairs with the one at the cursor. Enter indents the next line until the form is complete, TAB completes, the arglists of the call you’re in show up under the input, and values come back pretty printed, with how long they took at the right of the prompt.

What it does

Docs without leaving the prompt

,doc, ,source and ,apropos do what their clojure.repl namesakes do, Java’s members included with cider-nrepl. C-x C-d shows the documentation of what’s at the cursor and brings back what you’d typed, ,where says where something’s defined and ,refs which functions use it.

More in the README

~/demo

The recording plays with JavaScript on. The cast file plays in asciinema too.

,doc and ,source by name, ,where for the file and line it’s on, C-x C-d on the function the cursor’s in, and ,apropos searching the names.

Look inside your data

,inspect opens a value, or the last one, in cider-nrepl’s inspector, full-screen. The arrow keys move between the values in it, Enter digs into one and Backspace comes back out, and big collections come a screenful at a time. d defines what you’re looking at as a var, and q takes you back to the REPL.

More in the README

~/demo

The recording plays with JavaScript on. The cast file plays in asciinema too.

,inspect on today’s orders: into Rich’s order, its items and one of them, back out a level at a time, and q to the REPL.

Run the tests

,test runs a namespace’s tests, the ones you name or the whole project’s, and shows what didn’t pass and where, with what was expected next to what came back. ,retest reruns the ones that didn’t, and an error’s stack trace goes down to the test that hit it.

More in the README

~/demo

The recording plays with JavaScript on. The cast file plays in asciinema too.

A test that fails, with what it expected next to what it got, the fix made in an editor, then ,reload and ,retest.

Make sense of errors

,pst prints the last error’s stack trace without the frames of the REPL’s own machinery, and ,stacktrace browses it full-screen. Enter on a frame opens its source in your $EDITOR, a brings back what was left out, and with cider-nrepl i inspects the cause and d its ex-data.

More in the README

~/demo

The recording plays with JavaScript on. The cast file plays in asciinema too.

An ex-info from an order that isn’t there, ,pst with the frames that matter, and ,stacktrace with all of them, a for the JVM’s too, and d for the ex-data.

Reload as you edit

,autoreload reloads the namespaces whose files changed, and the ones that use them, before each evaluation, keeping what defonce defined. Code edited anywhere, in an editor or by a coding agent, is the code the next evaluation runs. ,reload does it when you ask.

More in the README

~/demo

The recording plays with JavaScript on. The cast file plays in asciinema too.

With ,autoreload on, a price changed in the file and a function added to it are there for the next evaluation, with nothing reloaded by hand.

Trace and profile

,trace traces a function, or every function in a namespace, so each call shows its arguments and what it returned, nested in the calls it’s in, calls from other threads included. ,profile times every call instead, and on its own shows how many calls each function had and how long they took.

More in the README

~/demo

The recording plays with JavaScript on. The cast file plays in asciinema too.

,trace on the namespace shows each call with its arguments and what it returned, nested in the calls it’s in. ,profile then times a thousand of them.

Scripts and coding agents

Most of what the REPL does is a command too, neorepl eval, doc, test, inspect, trace and the rest, each with --format json, and named sessions keep *ns*, *1 and *e from one call to the next. neorepl check --fix repairs the parens an edit left unbalanced, a skill teaches agents the workflow, and neorepl mcp serves it all over MCP.

More in the README

~/demo

The recording plays with JavaScript on. The cast file plays in asciinema too.

The REPL’s server from the shell: an evaluation, docs, a value as JSON, completions, and the project’s tests, whose failure shows in the exit status.

And the rest

Who it talks to

neorepl sends the ops CIDER sends, so it gets the most out of a server with cider-nrepl, and falls back to nREPL’s own ops and plain evaluation without one. It doesn’t add middleware of its own. It’s tested against all of these:

  • nREPL the reference server, with cider-nrepl for everything on this page, which jack-in adds to Leiningen and deps.edn projects
  • babashka bb nrepl-server, with CIDER’s essentials built in
  • shadow-cljs ClojureScript in the browser or on Node
  • piggieback ClojureScript REPLs, figwheel-main’s included
  • nbb ClojureScript on Node, no JVM needed
  • Basilisp Clojure on Python

Any other nREPL server works too, for evaluation and whatever ops it has.

News

Getting started

  1. Get babashka 1.13.227 or newer and bbin, then install neorepl with the command at the top of this page.
  2. Run neorepl in a project. It connects to the server whose .nrepl-port is in the directory or one above it, and with no server around it starts one with cider-nrepl, the way CIDER’s jack-in does, through whichever of Leiningen, the Clojure CLI, babashka and shadow-cljs the project uses.
  3. Want an editor or a coding agent on the same server? neorepl server starts one that stays up, ,sessions steps into another client’s session, and doc/editors.md and doc/agents.md have the setups.

In the REPL ,help lists the commands. Everywhere else neorepl --help and neorepl COMMAND --help do.

Questions

How is it different from clojure-cli.repl or bb repl --connect?
They’re nREPL clients too, after different things. neorepl’s goals are a CIDER-like REPL in the terminal, a command line that serves coding agents as well as people, and working with any nREPL server out there. The README has a side by side comparison.
Do I need cider-nrepl?
No, but most of the features come from it: the inspector, tracing, profiling, reloading and the like. When neorepl starts a server it adds cider-nrepl itself. Without it you get evaluation, completion and docs through nREPL’s own ops, and babashka has CIDER’s essentials built in.
Does it need babashka?
bbin installs it as a babashka script, which starts in a blink. The same source runs on the JVM too, with Java 17 or newer and Clojure 1.10 or newer, and from 0.6.0 on it installs as a Clojure CLI tool, with clojure -Ttools install-latest :lib io.github.nrepl/neorepl :as neorepl.
Can I use it next to my editor?
Sure. neorepl server starts a server for both to share, and neorepl eval evaluates from Neovim, Emacs and Helix without a plugin, which doc/editors.md sets up.
Does it work on Windows?
It’s tested on Linux, macOS and Windows, on babashka and on the JVM.

Keep hacking!

© 2026 Bozhidar Batsov and neorepl contributors. neorepl is built on nREPL. Source.