clj

Clojure tool to start a REPL or invoke a specific function with data.

TLDR

Start a REPL

$ clj
copy

Execute a function

$ clj -X [namespace/function_name]
copy

Run the main function of a specified namespace

$ clj -M -m [namespace] [args]
copy

Prepare a project by resolving dependencies, downloading libraries, and making / caching classpaths

$ clj -P
copy

Start an nREPL server with the CIDER middleware

$ clj -Sdeps '{:deps {nrepl {:mvn/version "0.7.0"} cider/cider-nrepl {:mvn/version "0.25.2"]}' -m nrepl.cmdline --middleware '["cider.nrepl/cider-middleware"]' --interactive
copy

Start a REPL for ClojureScript and open a web browser

$ clj -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "1.10.758"]}' --main cljs.main --repl
copy

Copied to clipboard
Dodo Farming