I wanted to use cljfmt along with helix editor which uses stdin/stdout for formatting so I made this wrapper.
clj -T:build binary
~/.clojure/deps.edn
:aliases
{ ...
:cfmt {:extra-deps {jlabath/cljfmtstd {:git/url "https://github.com/jlabath/cljfmtstd.git"
:git/sha "54d652d25a764cfd4a7fa48150d50109d0850bf3"}}
:main-opts ["-m" "jlabath.cljfmtstd"]}}
Note: the name cfmt is arbitrary you can call it :bob instead of :cfmt and then invoke it with clojure -Mbob
~/.config/helix/languages.toml
[[language]]
name = "clojure"
auto-format = true
formatter = { command = "clojure" , args = ["-Mcfmt"] }
in shell use ^D (ctrl-d) to end input
$ clojure -Mcfmt
( + 1 1)
^D
(+ 1 1)
$