poly
Search…
Install as Clojure CLI Tool
If we are using a recent version of the Clojure CLI -- 1.10.3.933 or later -- we can install poly as a "tool":
1
clojure -Ttools install io.github.polyfy/polylith '{:git/tag "v0.2.14-alpha" :deps/root "projects/poly"}' :as poly
Copied!
An alternative is to give a sha, which allows us to use versions that hasn't been released yet, e.g.:
1
clojure -Ttools install io.github.polyfy/polylith '{:git/sha "5f74c8b8675dbb091258165d327af3958716a247" :deps/root "projects/poly"}' :as poly
Copied!
Then we can invoke the poly tool using the CLI directly:
1
clojure -Tpoly info loc true
Copied!
Or start a poly shell, which uses the standard Polylith way of passing in arguments to commands:
1
clojure -Tpoly shell
Copied!
Installed versions can be listed with:
clojure -Ttools list
...or the shorter (clojure can often be replaced with clj):
clj -Ttools list
We can get basic built-in help via the CLI's help machinery:
1
clojure -A:deps -Tpoly help/doc
Copied!
Note: the command-line argument syntax for "tool" usage follows the CLI "exec args" format which is essentially Clojure's own keyword/value syntax (it's actually read as EDN).
How to use the poly command as a tool is described in the Clojure CLI Tool section. The official documentation can be found here.
Export as PDF
Copy link