Project nREPL support lets psi connect to or launch an nREPL for the current project worktree, distinct from psi's own runtime nREPL.
Project nREPL resolution is session-scoped by worktree path. When a command or mutation targets project nREPL, psi resolves the target worktree from explicit input first and otherwise from the invoking session worktree-path.
This keeps project REPL ownership aligned with the target project rather than adapter focus inference as the primary semantic input.
Psi supports two acquisition modes.
Psi launches a configured start command vector in the target worktree.
Configuration lives in psi config files under :agent-session :project-nrepl:
~/.psi/agent/config.edn<worktree>/.psi/project.edn<worktree>/.psi/project.local.ednCanonical shape:
{:agent-session
{:project-nrepl
{:start-command ["bb" "nrepl-server"]}}}
If both project files exist, psi deep-merges shared then local, so local values win.
Rules:
:start-command must be a non-empty vector of strings<worktree>/.nrepl-port:started :command-vector shape is no longer the canonical or supported config surfacePsi connects to an already-running nREPL endpoint.
Config shape:
{:agent-session
{:project-nrepl
{:attach {:host "localhost"
:port 7888}}}}
You may omit :host to use the default host behavior, and you may omit :port
to let psi fall back to <worktree>/.nrepl-port discovery.
Project nREPL config follows the same general config precedence as other project-scoped settings:
session runtime targeting
> <worktree>/.psi/project.local.edn
> <worktree>/.psi/project.edn
> ~/.psi/agent/config.edn
> system defaults
/project-repl — show status for the current worktree/project-repl start — start configured project nREPL/project-repl attach — attach to configured/discovered project nREPL/project-repl stop — stop the managed project nREPL instance/project-repl interrupt — interrupt active eval if available/project-repl eval <code> — evaluate code in the project nREPL.psi/project.local.edn.psi/project.ednCan you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |