neil
A CLI to add common aliases and features to deps.edn
-based projects.
Installation
Homebrew (Linux and macOS)
$ brew install babashka/brew/neil
Scoop (Windows)
$ scoop bucket add scoop-clojure https://github.com/littleli/scoop-clojure
$ scoop install neil
For detailed information about scoop installer check scoop-clojure.
Manual
- Install babashka
- Download the
neil
script to somewhere on yourPATH
. In Windows, also download theneil.bat
script and place it in thePATH
.
Status
As we're still finding out the best UX, neil
may undergo breaking changes from version to version.
Usage
Type neil
to see the help:
Usage: neil <subcommand>
Subcommands:
add
- dep: adds :lib, a fully qualified symbol, to deps.edn :deps. Example:
Options:
:lib - Fully qualified symbol. :lib keyword may be elided when lib name is provided as first option.
:version - Optional version. When not provided, picks newest version from Clojars or Maven Central.
:sha - When provided, assumes lib refers to Github repo.
:latest-sha - When provided, assumes lib refers to Github repo and then picks latest SHA from it.
- test: adds cognitect test runner to :test alias.
- build: adds tools.build build.clj file and :build alias.
Options:
:deps-deploy true - adds deps-deploy as dependency and deploy task in build.clj
- kaocha: adds kaocha test runner to :koacha alias.
Override alias names with :alias option:
neil add test :alias test2
add dep
This will add the newest version of clj-kondo to the :deps
map in deps.edn
:
$ neil add dep :lib clj-kondo/clj-kondo
The :lib
keyword may be elided if the libname is the first argument after dep
:
$ neil add dep clj-kondo/clj-kondo
The add dep
command will always overwrite an existing dependency.
To add a git library from Github you can use :sha
to provide a SHA or :latest-sha
to pick the latest sha from the default branch:
$ neil add dep borkdude/sci :latest-sha true
add build
To add tools.build related features, use:
$ neil add build :deps-deploy true
After that you can run tasks like:
$ clojure -T:build uber
$ clojure -T:build deploy
add test
$ neil add test
This will add the Cognitect test-runner to your deps.edn
so you can execute:
$ clojure -X:test
A similar option is supported for kaocha:
$ neil add kaocha
To change the alias you can provide an option like:
$ neil add kaocha :alias kaocha2
Roapmap
- Add
bb.edn
-related features for invokingtest
andbuild
tasks - Consider
neil test :only foo.bar
which invokesclojure -M:test -n foo.bar
- Option to add
cljs-test-runner
Contributing
If this project shows potential to you, I'd be happy to discuss and receive contributions.
Dev
See neil.rb for the brew Formula. You can install this formula locally with:
$ brew reinstall --build-from-source ./neil.rb`
License
TBD