deps-new 2026-10-09

Now that I'm using tools.deps.config, I believe it would be fairly easy to enhance it so you could store templates locally, at a user- or directory-level, in the .cljconf/org.corfield/deps-new/ data folder, with a deps.edn etc. Before I just go ahead and do the work out of curiosity, how useful do folks think that might actually be? It would allow you to create projects without specifying the complicated remote path pattern, just the template name. I think you could also add dependencies in that deps.edn file for any templates on GitHub you use frequently.

Not relevant to me currently, but then I still use deps-new (and a few other tools) via an alias, rather than install as a tool. I did wonder if the tools.deps.config was an alternative (or replacement) for programatic driven templates in deps-new. My approach to templates is basic, incuring code duplication across templates. I assume a more programatic approach would help minimise that. So maybe in future the tools.deps.config would be useful (once I get over the double dotfile laughcry )

🤣 1

User-config:

> cat ~/.config/clojure/.cljconf/org.corfield/deps-new/deps.edn
{:deps
 {; :template afrey/html_server_live_reload_template
  io.github.adamfrey/clojure-html-server-live-reload-template {:git/sha "4bc908f5d601e2ba24c477f7bc123e83f89635a3"}}}

Ah, so you can configure an installed tool and use it in a similar way to an alias, e.g. this is how I use my :project/create alias

clojure -T:project/create :template practicalli/service
:name practicalli gameboard :target-dir gameboard-service
Being able to specify one or more templates makes an installed tool nicer to use and more useful. Thanks for helping me understand tools a bit better.

There were several ways to specify a new template's code/config: via an alias -A:some-template-alias -Tnew create :template the/template :name project/name or via -Sdeps or via a complicated URL as part of the :template name. This new machinery adds a fourth way, which is just to specify the dependency in org.corfield/deps-new/deps.edn. You still need to specify :template the/template but it will automatically be on the classpath. The previously added tools.deps.config stuff in v0.15.0 lets you specify defaults for all the command-line arguments so you can omit things you "always" provide, e.g., `:developer "Practicalli Johnny".