Claujure
Claujure is a fork of bhauman/rebel-readline that integrates Claude Code directly into the Clojure REPL. Ask Claude questions, get help with your code, and explore ideas — all without leaving your terminal session.
What’s New: The :ai Command
Type :ai <prompt> at the REPL to send a question to Claude. Claujure automatically includes your current REPL context (namespace and public vars), so Claude’s responses are tailored to what you’re working on.
user=> (defn greet [name] (str "Hello, " name))
#'user/greet
user=> :ai what does the greet function do?
Asking Claude...
The `greet` function takes a `name` argument and returns a greeting
string by concatenating "Hello, " with the provided name.
Features
- Context-aware: Claude sees your current namespace and defined vars
- Tab completion: Type
:a+ TAB to complete to:ai - Error handling: Helpful messages if Claude Code isn’t installed or configured
- Non-blocking: Uses
claude -p(non-interactive mode) for clean inline output
Prerequisites
Claude Code must be installed and available on your PATH.
Quick Start
With the Clojure CLI tools installed:
clojure -J--enable-native-access=ALL-UNNAMED \
-Sdeps '{:deps {com.bhauman/rebel-readline {:local/root "/path/to/claujure/rebel-readline"}}}' \
-M -m rebel-readline.main
Or add a shell alias for convenience:
alias claujure="clojure -J--enable-native-access=ALL-UNNAMED -Sdeps '{:deps {com.bhauman/rebel-readline {:local/root \"/path/to/claujure/rebel-readline\"}}}' -M -m rebel-readline.main"
Replace /path/to/claujure with the actual path to your Claujure checkout.
All Rebel Readline Features
Claujure inherits all of Rebel Readline’s capabilities:
- Multi-line editing with auto-indentation
- TAB completion
- Argument documentation displayed after typing a function name
- Inline evaluation (Ctrl-X Ctrl-E)
- Quick access to documentation (Ctrl-X Ctrl-D), source (Ctrl-X Ctrl-S), and apropos (Ctrl-X Ctrl-A)
- Emacs and vi key bindings
- History search
Type :repl/help to see all available commands and key bindings.
For full Rebel Readline documentation, see the upstream project.
License
Copyright © 2018 Bruce Hauman
Distributed under the Eclipse Public License, version 1.0 or (at your option) any later version.