en un clic
nrepl-eval
// Evaluate Clojure code via nREPL using the standalone tools/nrepl-eval.mjs CLI tool.
// Evaluate Clojure code via nREPL using the standalone tools/nrepl-eval.mjs CLI tool.
Update the project CHANGES.md with issues from a given GitHub milestone, with correct categorization and references.
Create a user-facing GitHub issue from a PR, separating the WHAT from the HOW, with correct milestone, project, labels, and issue type.
Fetch information from Taiga public API for the Penpot project (id 345963) — issues, user stories, and tasks, without authentication.
Port changes from a specific Git commit to the current branch by manually applying the diff, avoiding cherry-pick when it would introduce complex conflicts.
| name | nrepl-eval |
| description | Evaluate Clojure code via nREPL using the standalone tools/nrepl-eval.mjs CLI tool. |
Evaluate Clojure (or ClojureScript) code via a running nREPL server using
tools/nrepl-eval.mjs — a standalone CLI application.
Session state (defs, in-ns, etc.) persists across invocations via a stored session ID, so you can build up state incrementally.
node tools/nrepl-eval.mjs [options] [<code>]
The tool is also executable directly:
./tools/nrepl-eval.mjs [options] [<code>]
| Flag | Description | Default |
|---|---|---|
-p, --port PORT | nREPL server port | 6064 |
-H, --host HOST | nREPL server host | 127.0.0.1 |
-t, --timeout MS | Timeout in milliseconds | 120000 |
--reset-session | Discard stored session and start fresh | — |
-e, --last-error | Evaluate *e to retrieve the last exception | — |
-h, --help | Show help message | — |
Use this tool when you need to:
:reload
to pick up changes.-e to
print the error stored in *e.Sessions are persisted to /tmp/penpot-nrepl-session-<host>-<port>. State
carries across calls automatically:
./tools/nrepl-eval.mjs '(def x 42)'
./tools/nrepl-eval.mjs 'x'
# => 42
Reset the session to start fresh:
./tools/nrepl-eval.mjs --reset-session '(def x 0)'
Single expression (inline) — uses default port 6064:
./tools/nrepl-eval.mjs '(+ 1 2 3)'
Multiple expressions via heredoc (recommended — avoids escaping issues):
./tools/nrepl-eval.mjs <<'EOF'
(def x 10)
(+ x 20)
EOF
Override with a different port:
./tools/nrepl-eval.mjs -p 7888 '(+ 1 2 3)'
After code throws an error, retrieve the full exception details:
./tools/nrepl-eval.mjs -e
Require a namespace with reload:
./tools/nrepl-eval.mjs "(require '[my.namespace :as ns] :reload)"
Test a function:
./tools/nrepl-eval.mjs "(ns/my-function arg1 arg2)"
Long-running operation with custom timeout:
./tools/nrepl-eval.mjs -t 300000 "(long-running-fn)"
-p needed when
your nREPL server is on 6064. Use -p <PORT> for a different port.:reload when requiring namespaces to pick up file changes.--reset-session to clear.