clojure/clojure-cli.repl

Clojure CLI enhanced REPL

Clojure

2

35 commits

updated Sep 28, 2026

See the code

See what people are saying

SourceMessageScoreDate

Clojure-Cli.repl

4

Sep 28, 2026

README

clojure-cli.repl

A REPL for the Clojure CLI featuring multi-line editing with proper indentation, bracket highlighting, structural editing, inline eval, doc lookup for Clojure and Java, a data inspector, configurable prompts, keybindings, and much more.

It runs as two processes. An nREPL server that evaluates code, and a JLine client that provides a terminal prompt. Separate processes keep the client dependencies off the project classpath.

Install

Add these aliases to your user deps.edn:

{:aliases
 {:repl   {:extra-deps {io.github.clojure/clojure-cli.repl-server {:mvn/version "0.1.0"}}
           :main-opts ["-m" "clojure-cli.repl.server" "repl"]}
  :serve  {:extra-deps {io.github.clojure/clojure-cli.repl-server {:mvn/version "0.1.0"}}
           :main-opts ["-m" "clojure-cli.repl.server"]}
  :attach {:replace-paths []
           :replace-deps {io.github.clojure/clojure-cli.repl-client {:mvn/version "0.1.0"}}
           :main-opts ["-m" "clojure-cli.repl.client"]}}}

The server runs on the project classpath. The client runs in its own JVM with only its own deps.

Note: Java 17+ is required

Run

  • clojure -M:repl starts a server that spawns a client
  • clojure -M:serve starts a server, writing its port to .nrepl-port
  • clojure -M:attach [port] attaches a client, reading .nrepl-port when no port is given

Example Config

The REPL offers many customization options. An example config is provided as a reference or starting point. Copy it into the project dir, or into ~/.clojure for use in all projects:

git clone https://github.com/clojure/clojure-cli.repl.git
cp -R clojure-cli.repl/examples/.cljconf .

Demos

The example prompt displays the current ns, the outcome (✓|✗) and duration of the last eval, the server heap, and the wall clock:

prompt gif

Eval the form at the cursor without submitting the line:

inline eval gif

Display Clojure or Java docs for the symbol at the cursor:

doc gif

Structural editing:

paredit gif

Browse the last result, drill into nested data:

inspector gif

Configuration

The REPL is highly customizable. Behavior can be configured at the user level, project level, or both.

KeysConfigureDocs
:promptThe promptPrompts
:middlewareServer data on eval responsesMiddleware
:keybindings :editing-modeKeys and widgetsKeys
:paredit/<op> :bracket-pairs :eval-form-at-cursor :doc-at-cursorEditingStructural editing
:inspectBrowse the last resultInspector
:eval-hook :print-hook :caught-hookServer hooksHooks
:history :auto-require :port and dynamic varsSession behaviorConfiguration

Tests

cd client && clojure -M:test

Copyright © 2026

All rights reserved. The use and distribution terms for this software are covered by the Eclipse Public License 1.0 which can be found in the file LICENSE at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software.

clojure/clojure-cli.repl

Clojure CLI enhanced REPL

Clojure

2

35 commits

updated Sep 28, 2026

See the code

See what people are saying

SourceMessageScoreDate

Clojure-Cli.repl

4

Sep 28, 2026

README

clojure-cli.repl

A REPL for the Clojure CLI featuring multi-line editing with proper indentation, bracket highlighting, structural editing, inline eval, doc lookup for Clojure and Java, a data inspector, configurable prompts, keybindings, and much more.

It runs as two processes. An nREPL server that evaluates code, and a JLine client that provides a terminal prompt. Separate processes keep the client dependencies off the project classpath.

Install

Add these aliases to your user deps.edn:

{:aliases
 {:repl   {:extra-deps {io.github.clojure/clojure-cli.repl-server {:mvn/version "0.1.0"}}
           :main-opts ["-m" "clojure-cli.repl.server" "repl"]}
  :serve  {:extra-deps {io.github.clojure/clojure-cli.repl-server {:mvn/version "0.1.0"}}
           :main-opts ["-m" "clojure-cli.repl.server"]}
  :attach {:replace-paths []
           :replace-deps {io.github.clojure/clojure-cli.repl-client {:mvn/version "0.1.0"}}
           :main-opts ["-m" "clojure-cli.repl.client"]}}}

The server runs on the project classpath. The client runs in its own JVM with only its own deps.

Note: Java 17+ is required

Run

  • clojure -M:repl starts a server that spawns a client
  • clojure -M:serve starts a server, writing its port to .nrepl-port
  • clojure -M:attach [port] attaches a client, reading .nrepl-port when no port is given

Example Config

The REPL offers many customization options. An example config is provided as a reference or starting point. Copy it into the project dir, or into ~/.clojure for use in all projects:

git clone https://github.com/clojure/clojure-cli.repl.git
cp -R clojure-cli.repl/examples/.cljconf .

Demos

The example prompt displays the current ns, the outcome (✓|✗) and duration of the last eval, the server heap, and the wall clock:

prompt gif

Eval the form at the cursor without submitting the line:

inline eval gif

Display Clojure or Java docs for the symbol at the cursor:

doc gif

Structural editing:

paredit gif

Browse the last result, drill into nested data:

inspector gif

Configuration

The REPL is highly customizable. Behavior can be configured at the user level, project level, or both.

KeysConfigureDocs
:promptThe promptPrompts
:middlewareServer data on eval responsesMiddleware
:keybindings :editing-modeKeys and widgetsKeys
:paredit/<op> :bracket-pairs :eval-form-at-cursor :doc-at-cursorEditingStructural editing
:inspectBrowse the last resultInspector
:eval-hook :print-hook :caught-hookServer hooksHooks
:history :auto-require :port and dynamic varsSession behaviorConfiguration

Tests

cd client && clojure -M:test

Copyright © 2026

All rights reserved. The use and distribution terms for this software are covered by the Eclipse Public License 1.0 which can be found in the file LICENSE at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software.

Languages

Clojure

100.0%