How do you print the dependency tree including all the extra-deps added by a list of aliases?
That is, not just clj -X:deps tree but more like clj -X:dev:test:tree (which doesn't seem to work)
The aliases I'm interested in don't add that much - only reference one other local/root module. SO I tried this, but it fails
$ clj -X:deps tree :extra '"../build/deps.edn"'
Error generating tree: class java.lang.String cannot be cast to class clojure.lang.Associative (java.lang.String is in module java.base of loader 'bootstrap'; clojure.lang.Associative is in unnamed module of loader 'app')
i think you say clj -A:foo:bar -X:deps etc
No, that adds the aliases to the call to the deps program, you want it as an arg
Use the :aliases arg
clj -X:deps tree :aliases ‘[:dev :test]’
Ah, of course! I don't know how I missed it (I actually looked at the docstring) Thanks!
I missed it as well once, and it took me while to google for it. Similar question for ":prep". Not sure we might check to document it better.
I think I tried to ask the cli for help which was not successful:
[carsten@nixos:~]$ clj -X:deps --help
Namespace clojure.tools.deps.cli.api loaded but function not found: --help
[carsten@nixos:~]$ clj -X:deps :help
Problem parsing arguments: Insufficient input [:help]
[carsten@nixos:~]$ clj -X:deps tree --help
Key is missing value: --help
[carsten@nixos:~]$ clj -X:deps tree :help
Key is missing value: :helpThen I gave up....
@jumar @carsten.behring You may find this blog post helpful https://corfield.org/blog/2025/08/08/deps/
clj -X:deps help/dir and clj -X:deps help/doc :fn tree get you the help / documentation for :deps functions.
The basis options for all of the :deps functions are the same, and are documented in the https://clojure.github.io/tools.deps.cli/clojure.tools.deps.cli.api-api.html#clojure.tools.deps.cli.api/prep. Help is documented in the https://clojure.org/reference/clojure_cli#fn_help page.
I'm happy to add more docs/examples in the places people must naturally look. Some options would be clj -h , man clj, CLI reference page, and API docs. Where would be the best place?