One of the features I’d love to have is scripting in Clojure. I would like to create stand-alone scripts that I can run, but are written in Clojure. When I first saw
clj, I thought it might be it and actually I am using it in a couple of places; but I’m finding a number of problems in using it effectively.
Obviously, it would be useful to have a script that I can just run and not care what it is written in. so it should start with a
#! /usr/bin/env clj- but - being said script a Clojure file, it does not work.
- External deps file
I am currently living with a top
deps.ednfile at the root of my project, but it end up being a free-for-all where a lot of jars live. It would be better to have a way to specify which deps we need in the script itself.
- Scripting conveniences
It would be nice to integrate a simpler version of https://github.com/clojure/tools.cli so you can easily declare params in.
Maybe I’m using the wrong tool for the job, or maybe I should just write a shell script that strips the first lines starting with a
#, builds an ad-hoc deps.edn and runs clj behind the scenes.
What do you think? anybody else having similar concerns?
PS. Scripts plus Sqlite end up being quite powerful for a lot of small tasks…