Fork me on GitHub

I’ve been doing some monorepo spelunking and am calling programmatically to get the dependency hierarchy. To get the result as data:

(-> (deps/tree {:project deps-map, 
                :format :edn})
Works a treat. That said, the round-tripping from pprint within cli/tree and re-parsing makes me suspect I’m doing it wrong.


I could call>tree but there’s some nice setup within cli/tree that I’d rather not duplicate


I suspect this information is in the basis as well. My likely-too-brief and naïve inspection of the basis thinks shows that it’s already flattened and inverted from what’s returned by cli/tree (listing parents rather than children).

Alex Miller (Clojure team)11:04:41

There is not sufficient information in the rest of the basis to construct the “tree” (it's not really a tree)

tree-shake 1
Alex Miller (Clojure team)12:04:49

Something could probably be factored better for programmatic use, feel free to add a request to


Will do! Thanks, @U064X3EF3 🙂


Is that preferred over opening a TDEPS issue and sending a patch?

Alex Miller (Clojure team)12:04:08

Ask is preferred first, then I make a jira from that

🎸 1
Alex Miller (Clojure team)12:04:36

If you want to provide a patch on that, that would be fine