     [cljs-api-gen.config :refer [repos-dir]]
     ))
 
-(def ^:dynamic *cljs-version* "ClojureScript version string   (e.g. \"0.0-3211\")" nil)
-(def ^:dynamic *cljs-num*     "ClojureScript version number   (e.g. 3211)" nil)
-(def ^:dynamic *cljs-tag*     "ClojureScript version git tag  (e.g. \"r3211\")" nil)
-(def ^:dynamic *cljs-date*    "ClojureScript version date     (e.g. \"2015-03-09\")" nil)
-(def ^:dynamic *clj-version*  "Clojure version string         (e.g. \"1.7.0-beta1\")" nil)
-(def ^:dynamic *clj-tag*      "Clojure version git tag        (e.g. \"clojure-1.7.0-beta1\"" nil)
-(def ^:dynamic *gclosure-lib* "Google Closure release         (e.g. \"0.0-20150505-021ed5b3\"" nil)
+(def ^:dynamic *cljs-version*    "ClojureScript version string   (e.g. \"0.0-3211\")" nil)
+(def ^:dynamic *cljs-num*        "ClojureScript version number   (e.g. 3211)" nil)
+(def ^:dynamic *cljs-tag*        "ClojureScript version git tag  (e.g. \"r3211\")" nil)
+(def ^:dynamic *cljs-date*       "ClojureScript version date     (e.g. \"2015-03-09\")" nil)
+(def ^:dynamic *clj-version*     "Clojure version string         (e.g. \"1.7.0-beta1\")" nil)
+(def ^:dynamic *clj-tag*         "Clojure version git tag        (e.g. \"clojure-1.7.0-beta1\"" nil)
+(def ^:dynamic *gclosure-lib*    "Google Closure release         (e.g. \"0.0-20150505-021ed5b3\"" nil)
+
+(def ^:dynamic *treader-version* "tools.reader version string    (e.g. \"0.9.2\"" nil)
+(def ^:dynamic *treader-tag*     "tools.reader git tag           (e.g. \"tools.reader-0.9.2\"" nil)
 
 (defn clone-or-pull!
   [repo-url]


(defmacro with-checkout!
  [cljs-tag & body]
  `(let [{clj-tag# :clj-tag
          clj-version# :clj-version
          gclosure-lib# :gclosure-lib} (cljs-tag->dep-releases ~cljs-tag)]
     (checkout-repo! "clojurescript" ~cljs-tag)
     (checkout-repo! "clojure" clj-tag#)
     (binding [*cljs-tag*     ~cljs-tag
               *cljs-date*    (repo-tag-date "clojurescript" ~cljs-tag)
               *cljs-version* (cljs-tag->version ~cljs-tag)

  (when-not (exists? repos-dir)
    (mkdir repos-dir))
  (clone-or-pull! "https://github.com/clojure/clojurescript")
  (clone-or-pull! "https://github.com/clojure/clojure")
  (clone-or-pull! "https://github.com/clojure/tools.reader"))

(defn get-current-repo-tag
  [repo]
