Adding Clojure Dependencies from the Command Line


While debugging a live reload issue of Clay a few days ago, I learned from Markus Agwin that we can actually add dependencies on the fly from the command line, just like this: clj -Sdeps "{:deps {org.scicloj/clay {:mvn/version \"2-beta21\"}}}".

Even better, we can add dependency from a Git repo and specify the commit hash: clj -Sdeps "{:deps {io.github.scicloj/clay {:git/url \"https://github.com/scicloj/clay.git\" :git/sha \"35a46541db66ae6b4e1af628b7c24c42d3be418f\"}}}", which is really helpful for experimenting and verifying things.

Some clj links (clj --help has a pointer for these URLs):

Clojure  Tweet  clj 

See also

comments powered by Disqus