TIL: lein search

This’ll be a quick one: let’s say you know what library you want to add to your Clojure project; how do you figure the exact string / version to add to your dependencies? Search Clojars / Maven Central? Google for the project’s GitHub page? Leiningen users actually have a quicker answer:

lein search.

I don’t know how I made it this many years into my Clojure career without discovering this handy command, but I’ll definitely be using it going forward.

Here’s a basic sample session:

$ lein search collbox
Searching central ...
Searching clojars ...
[collbox/pushy "0.3.9"]
  HTML5 pushState for Clojurescript (CollBox fork)
[camdez/pushy "0.3.9"]
  HTML5 pushState for Clojurescript (CollBox fork)

I’m never leaving the comfort of my command line again.