Creates or updates your deps.edn file, based on your project’s project.clj
Branch: master
Clone or download
hagmonk Merge pull request #3 from tomasd/master
Include profile sources in alias
Latest commit b3f6151 Nov 5, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/depify Src and resources are default implicit paths in leiningen Nov 4, 2018
test/depify Bump SHA Jun 14, 2018
deps.edn updated readme, and missing deps.edn update Jun 11, 2018



depify reads your Leiningen project.clj configuration file and produces a deps.edn file suitable for the Clojure CLI tools.

deps.edn and the Clojure CLI tools have a narrower focus than Leiningen or Boot, but depify will do its best to produce a useful deps.edn replacement. This includes adding extra aliases to provide “missing” functionality. One such example is the addition of the :test and :runner aliases borrowed from Sean Corfield’s dot-clojure repo. Other aliases may be added in the future - PRs are always welcome!


  • 2018-06-13
    • Add ability to read lein pprint output from stdin (actually fixes #2)
  • 2018-06-12
    • Add ability to read project.clj from stdin (fixes #2)
  • 2018-06-11
    • Hefty refactoring (fixes #1 and many other issues)


Create an alias in your ~/.clojure/deps.edn map:

:depify {:extra-deps {org.clojure/clojure {:mvn/version "1.9.0"}
                      depify              {:git/url ""
                                           :sha     "04329744872890711dbba8939a16e9987dd33bb3"}}
         :main-opts  ["-m" "depify.project"]}
:zprint {:extra-deps {org.clojure/clojure {:mvn/version "1.9.0"}
                      zprint              {:mvn/version "0.4.9"}}
         :main-opts  ["-m" "zprint.main"]}

Then, invoke depify in any folder that contains a project.clj:

clj -A:depify

depify will read any pre-existing deps.edn file in your project folder and use that as an initial starting point. The result of merging project.clj into deps.edn will be printed to standard out.

depify can also read project.clj files from stdin. This can be handy if, for instance, you want to import a pile of dependencies into your current deps.edn from a remote project.clj:

curl -L -o - "" | clj -A:depify

depify can also interpret the output from lein pprint. This has the advantage of evaluating content inside project.clj - for instance, quoted variables are expanded, paths are resolved, etc.

lein pprint | clj -A:depify

lein pprint can be invoked with a list of keys in order to extract specific values from the project.clj data. depify can handle any key that returns a list of maven coordinates, which will be interpreted as simple dependencies. The following will result in a dependency set that is the union of both keys:

lein pprint :dependencies :plugins | clj -A:depify

Notice in my ~/.clojure/deps.edn I also have zprint as an alias, enabling this from your project folder:

clj -A:depify | clj -A:zprint > deps.edn.tmp ; mv deps.edn.tmp deps.edn

You may see a “Stream closed” exception emitted by zprint, which can be safely ignored.


Based on the initial concept in this gist by Sean Walker. depify improves on it slightly:

Adds entries to the existing deps.edn, if available


{:deps {ding/dong {:mvn/version "1.0"}}}


(defproject super-dooper "1.0"
  :dependencies [[tick/tock "1.0"]])


{:deps {ding/dong {:mvn/version "1.0"}, tick/tock {:mvn/version "1.0"}}}

Handles variable unquoting in project.clj


(def something "0.1.2")
(defproject foobar "1.0"
  :dependencies [[something/gizmo ~something]])


{:deps {something/gizmo {:mvn/version "0.1.2"}}}

Places lein’s :main and :jvm-opts under an alias called :run


(defproject super-dooper "1.0"
  :jvm-opts ["-XX:+EnormousBiceps"]
  :main super-dooper.core
  :dependencies [[ding/dong "1.0"]])


  {:jvm-opts ["-XX:+EnormousBiceps"],
   :main-opts ["-m" "super-dooper.core"]}},
 :deps {ding/dong {:mvn/version "1.0"}}}

Creates aliases for any :profiles


(defproject super-dooper "1.0"
  :jvm-opts ["-XX:+EnormousBiceps"]
  :main super-dooper.core
  :dependencies [[ding/dong "1.0"]]
  :profiles {:dev {:dependencies [[tick/tock "1.0"]]
                   :jvm-opts ["-XX:+CrashAndBurn"]}})


  {:jvm-opts ["-XX:+EnormousBiceps"],
   :main-opts ["-m" "super-dooper.core"]},
  {:jvm-opts ["-XX:+CrashAndBurn"],
   :extra-deps {tick/tock {:mvn/version "1.0"}}}},
 :deps {ding/dong {:mvn/version "1.0"}}}

Adds :test-paths to the :test alias


(defproject super-dooper "1.0"
  :dependencies [[ding/dong "1.0"]]
  :test-paths ["testomatic"])


  {:extra-paths ["test" "testomatic"],
   :extra-deps {org.clojure/test.check {:mvn/version "RELEASE"}}},
    {:git/url "",
     :sha "76568540e7f40268ad2b646110f237a60295fa3c"}},
   :main-opts ["-m" "cognitect.test-runner" "-d" "test"]}},
 :deps {ding/dong {:mvn/version "1.0"}}}

Adds :source-paths and :resource-paths to :paths


(defproject super-dooper "1.0"
  :dependencies [[ding/dong "1.0"]]
  :resource-paths ["more-resources"]
  :source-paths ["more-sources"])


{:deps  {ding/dong {:mvn/version "1.0"}},
 :paths ["src" "more-sources" "more-resources"]}

Adds :respositories to :mvn/repos


(defproject super-dooper "1.0"
  :dependencies [[ding/dong "1.0"]]
  :repositories [["" ""]
                  {:url      ""
                   :username "milgrim",
                   :password :env}]])


{:deps {ding/dong {:mvn/version "1.0"}},
 {"" {:url ""},
  "releases" {:url ""}}}


Tests can be invoked with:

clj -A:test