cursive

onetom 2026-03-18T10:16:32.524469Z

do i see it correctly, that i can't customize the name of the REPL port file for "Local" Clojure REPL run configs? i was thinking that if clojure-mcp starts a REPL for me via its :start-nrepl-cmd option, then i might still want to run a separate cursive repl process alongside it, but when i start a local cursive repl, it just overwrites the .nrepl-port file. it's also unclear, how whether i can instruct clojure-mcp to attempt connecting to an nREPL server, if it sees a .nrepl-port file and only start a new nREPL server, if there is no such file or there is no such port open (or the port is not served by an nREPL server)

onetom 2026-03-18T10:17:21.946619Z

im also wondering this, since the "Remote" Clojure REPL run config allows specifying a "custom port file"

bhauman 2026-03-18T16:58:00.622269Z

really the best way to do this is not hook up the repl when you start clojure-mcp

bhauman 2026-03-18T16:58:34.088239Z

the llm can find the repl and use different repls depending on the context

➕ 1
🙏 1
cfleming 2026-03-18T20:20:10.273899Z

I'll check, but I think the name of the port file comes from nREPL itself, I'm not sure it allows customising it.

🙏 1
onetom 2026-03-25T01:54:32.194509Z

it has just occurred to me to use UNIX socket files instead of TCP ports, because files would be scoped to work trees naturally, making discovery more trivial. AI agents could even use their built-in file-finding tools to look for nREPL UNIX socket files. it's a simpler choice IF we don't need more than one REPL server per clojure project directory. BUT Cursive doesn't support socket REPLs atm 😞 and nREPL doesn't support sockets and ports at the same time 😞 ( https://github.com/nrepl/nrepl/blob/cc6b88f39e6e81333f5a87767e36885bb2937fe3/src/clojure/nrepl/server.clj#L213 )

cfleming 2026-03-25T01:56:35.904989Z

Cursive does support socket REPLs. It creates a structured protocol over the socket so it's not a pure streaming REPL, but I can't see why it wouldn't work for that use case.

cfleming 2026-03-25T01:57:23.058579Z

At least, it does for remote REPLs, but not for starting one up. So you'd have to start the REPL and then connect to it.

cfleming 2026-03-25T01:57:28.029529Z

Hmm

onetom 2026-03-25T01:57:31.320939Z

i meant nREPL via UNIX socket file

onetom 2026-03-25T01:58:36.181389Z

$ mkdir -m go-rwx nrepl-test
$ clj -M:nREPL -m nrepl.cmdline --socket nrepl-test/socket
https://nrepl.org/nrepl/usage/server.html#starting-a-server

onetom 2026-03-25T02:00:18.305599Z

the regular socket REPL we do use as a health check mechanism, because if something goes wrong during nrepl initialization, we can still can peek into the process simply with echo ... | ssh datomic-cloud-ion nc ...

cfleming 2026-03-25T02:00:45.963239Z

Oh I see. That seems like a nice feature actually, could you file an issue and I'll add that?

👍 1
🔥 1
onetom 2026-03-25T02:15:45.666409Z

https://github.com/cursive-ide/cursive/issues/3090

👍 1